wip
This commit is contained in:
parent
77902e8d80
commit
fdacda9b9d
|
@ -58,60 +58,60 @@ class SwNotification {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'reply':
|
case 'reply':
|
||||||
return [t('_notification.youGotReply', { name: getUserName(data.body.user) }), {
|
return [t('_notification.youGotReply', { name: getUserName(data.body.user) }), {
|
||||||
body: getNoteSummary(data.body.note, i18n.locale),
|
body: getNoteSummary(data.body.note, i18n.locale),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'renote':
|
case 'renote':
|
||||||
return [t('_notification.youRenoted', { name: getUserName(data.body.user) }), {
|
return [t('_notification.youRenoted', { name: getUserName(data.body.user) }), {
|
||||||
body: getNoteSummary(data.body.note, i18n.locale),
|
body: getNoteSummary(data.body.note, i18n.locale),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'quote':
|
case 'quote':
|
||||||
return [t('_notification.youGotQuote', { name: getUserName(data.body.user) }), {
|
return [t('_notification.youGotQuote', { name: getUserName(data.body.user) }), {
|
||||||
body: getNoteSummary(data.body.note, i18n.locale),
|
body: getNoteSummary(data.body.note, i18n.locale),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'reaction':
|
case 'reaction':
|
||||||
return [`${data.body.reaction} ${getUserName(data.body.user)}`, {
|
return [`${data.body.reaction} ${getUserName(data.body.user)}`, {
|
||||||
body: getNoteSummary(data.body.note, i18n.locale),
|
body: getNoteSummary(data.body.note, i18n.locale),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'pollVote':
|
case 'pollVote':
|
||||||
return [t('_notification.youGotPoll', { name: getUserName(data.body.user) }), {
|
return [t('_notification.youGotPoll', { name: getUserName(data.body.user) }), {
|
||||||
body: getNoteSummary(data.body.note, i18n.locale),
|
body: getNoteSummary(data.body.note, i18n.locale),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'follow':
|
case 'follow':
|
||||||
return [t('_notification.youWereFollowed'), {
|
return [t('_notification.youWereFollowed'), {
|
||||||
body: getUserName(data.body.user),
|
body: getUserName(data.body.user),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'receiveFollowRequest':
|
case 'receiveFollowRequest':
|
||||||
return [t('_notification.youReceivedFollowRequest'), {
|
return [t('_notification.youReceivedFollowRequest'), {
|
||||||
body: getUserName(data.body.user),
|
body: getUserName(data.body.user),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'followRequestAccepted':
|
case 'followRequestAccepted':
|
||||||
return [t('_notification.yourFollowRequestAccepted'), {
|
return [t('_notification.yourFollowRequestAccepted'), {
|
||||||
body: getUserName(data.body.user),
|
body: getUserName(data.body.user),
|
||||||
icon: data.body.user.avatarUrl
|
icon: data.body.user.avatarUrl
|
||||||
}];
|
}];
|
||||||
|
|
||||||
case 'groupInvited':
|
case 'groupInvited':
|
||||||
return [t('_notification.youWereInvitedToGroup'), {
|
return [t('_notification.youWereInvitedToGroup'), {
|
||||||
body: data.body.group.name
|
body: data.body.group.name
|
||||||
}];
|
}];
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ class SwNotification {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const swNotification = new SwNotification();
|
export const swNotification = new SwNotification();
|
||||||
|
|
Loading…
Reference in New Issue