diff --git a/packages/sw/src/create-notification.ts b/packages/sw/src/create-notification.ts index 9dd8426ef2..70a112da61 100644 --- a/packages/sw/src/create-notification.ts +++ b/packages/sw/src/create-notification.ts @@ -56,7 +56,7 @@ async function composeNotification(data case 'mention': return [t('_notification.youGotMention', { name: getUserName(data.body.user) }), { - body: getNoteSummary(data.body.note, i18n.locale), + body: getNoteSummary(data.body.note, i18n), icon: data.body.user.avatarUrl, data, actions: [ @@ -69,7 +69,7 @@ async function composeNotification(data case 'reply': return [t('_notification.youGotReply', { name: getUserName(data.body.user) }), { - body: getNoteSummary(data.body.note, i18n.locale), + body: getNoteSummary(data.body.note, i18n), icon: data.body.user.avatarUrl, data, actions: [ @@ -82,7 +82,7 @@ async function composeNotification(data case 'renote': return [t('_notification.youRenoted', { name: getUserName(data.body.user) }), { - body: getNoteSummary(data.body.note.renote, i18n.locale), + body: getNoteSummary(data.body.note.renote, i18n), icon: data.body.user.avatarUrl, data, actions: [ @@ -95,7 +95,7 @@ async function composeNotification(data case 'quote': return [t('_notification.youGotQuote', { name: getUserName(data.body.user) }), { - body: getNoteSummary(data.body.note, i18n.locale), + body: getNoteSummary(data.body.note, i18n), icon: data.body.user.avatarUrl, data, actions: [ @@ -114,7 +114,7 @@ async function composeNotification(data case 'reaction': return [`${data.body.reaction} ${getUserName(data.body.user)}`, { - body: getNoteSummary(data.body.note, i18n.locale), + body: getNoteSummary(data.body.note, i18n), icon: data.body.user.avatarUrl, data, actions: [ @@ -127,7 +127,7 @@ async function composeNotification(data case 'pollVote': return [t('_notification.youGotPoll', { name: getUserName(data.body.user) }), { - body: getNoteSummary(data.body.note, i18n.locale), + body: getNoteSummary(data.body.note, i18n), icon: data.body.user.avatarUrl, data, }];