diff options
Diffstat (limited to 'packages/sw/src/scripts/create-notification.ts')
| -rw-r--r-- | packages/sw/src/scripts/create-notification.ts | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/sw/src/scripts/create-notification.ts b/packages/sw/src/scripts/create-notification.ts index 2e1ab719ac..32b12f4b4f 100644 --- a/packages/sw/src/scripts/create-notification.ts +++ b/packages/sw/src/scripts/create-notification.ts @@ -1,5 +1,5 @@ /* - * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-FileCopyrightText: syuilo and misskey-project * SPDX-License-Identifier: AGPL-3.0-only */ @@ -231,7 +231,15 @@ async function composeNotification(data: PushNotificationDataMap[keyof PushNotif badge: iconUrl('bell'), data, }]; - + + case 'edited': + return [t('_notification.edited', { name: getUserName(data.body.user) }), { + body: data.body.note.text ?? '', + icon: data.body.user.avatarUrl, + badge: iconUrl('messages'), + data, + }]; + default: return null; } |