summaryrefslogtreecommitdiff
path: root/packages/sw/src/scripts/create-notification.ts
diff options
context:
space:
mode:
authorKaity A <kaity@atikayda.au>2024-02-24 05:05:25 +0000
committerKaity A <kaity@atikayda.au>2024-02-24 05:05:25 +0000
commitdef2e8dff03da399e68045eec02dddc9d1781a0a (patch)
tree6246b4898fb88d045c09accaf51d6a60b554d80e /packages/sw/src/scripts/create-notification.ts
parentfix: delete old follow request (if exists) before creating new (diff)
parentmerge: Reactions not working on child notes in detailed view (!438) (diff)
downloadsharkey-def2e8dff03da399e68045eec02dddc9d1781a0a.tar.gz
sharkey-def2e8dff03da399e68045eec02dddc9d1781a0a.tar.bz2
sharkey-def2e8dff03da399e68045eec02dddc9d1781a0a.zip
Merge remote-tracking branch 'origin/develop' into fix/failed-follow
Diffstat (limited to 'packages/sw/src/scripts/create-notification.ts')
-rw-r--r--packages/sw/src/scripts/create-notification.ts12
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;
}