summaryrefslogtreecommitdiff
path: root/src/web/app/common/scripts
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-11-23 06:03:54 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-11-23 06:03:54 +0900
commit182612d5401f2b91b6bda1bb85fda44605ef51d1 (patch)
tree35f7ee05fea02100b7a71e2911fd6ed6b6fe172d /src/web/app/common/scripts
parentoops (diff)
downloadsharkey-182612d5401f2b91b6bda1bb85fda44605ef51d1.tar.gz
sharkey-182612d5401f2b91b6bda1bb85fda44605ef51d1.tar.bz2
sharkey-182612d5401f2b91b6bda1bb85fda44605ef51d1.zip
リアクションもServiceWorkerで通知するように
Diffstat (limited to 'src/web/app/common/scripts')
-rw-r--r--src/web/app/common/scripts/compose-notification.ts8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/web/app/common/scripts/compose-notification.ts b/src/web/app/common/scripts/compose-notification.ts
index 181dca734f..d0e0c2098d 100644
--- a/src/web/app/common/scripts/compose-notification.ts
+++ b/src/web/app/common/scripts/compose-notification.ts
@@ -1,4 +1,5 @@
import getPostSummary from '../../../../common/get-post-summary';
+import getReactionEmoji from '../../../../common/get-reaction-emoji';
type Notification = {
title: string;
@@ -39,6 +40,13 @@ export default function(type, data): Notification {
icon: data.user.avatar_url + '?thumbnail&size=64'
};
+ case 'reaction':
+ return {
+ title: `${data.user.name}: ${getReactionEmoji(data.reaction)}:`,
+ body: getPostSummary(data.post),
+ icon: data.user.avatar_url + '?thumbnail&size=64'
+ };
+
case 'unread_messaging_message':
return {
title: `${data.user.name}さんからメッセージ:`,