diff options
Diffstat (limited to 'packages/sw/src/scripts/create-notification.ts')
| -rw-r--r-- | packages/sw/src/scripts/create-notification.ts | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 3c37657958..2b7dfd4f2d 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -210,6 +210,25 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif tag: `achievement:${data.body.achievement}`, }]; + case 'exportCompleted': { + const entityName = { + antenna: i18n.ts.antennas, + blocking: i18n.ts.blockedUsers, + clip: i18n.ts.clips, + customEmoji: i18n.ts.customEmojis, + favorite: i18n.ts.favorites, + following: i18n.ts.following, + muting: i18n.ts.mutedUsers, + note: i18n.ts.notes, + userList: i18n.ts.lists, + } as const satisfies Record<typeof data.body.exportedEntity, string>; + + return [i18n.tsx._notification.exportOfXCompleted({ x: entityName[data.body.exportedEntity] }), { + badge: iconUrl('circle-check'), + data, + }]; + } + case 'pollEnded': return [i18n.ts._notification.pollEnded, { body: data.body.note.text ?? '', |