mirror of
https://github.com/sim1222/misskey.git
synced 2025-08-07 17:23:54 +09:00
リアクションもServiceWorkerで通知するように
This commit is contained in:
@ -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}さんからメッセージ:`,
|
||||
|
Reference in New Issue
Block a user