feat: エクスポート完了時に通知を発行するように (#14484)
* feat: エクスポート完了時に通知を発行するように * Update Changelog * entitity -> entity * fix: ペイロードを含むように * fix icon * exportableEntities -> userExportableEntities
This commit is contained in:
@@ -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 ?? '',
|
||||
|
Reference in New Issue
Block a user