diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2020-01-30 04:37:25 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-01-30 04:37:25 +0900 |
| commit | f6154dc0af1a0d65819e87240f4385f9573095cb (patch) | |
| tree | 699a5ca07d6727b7f8497d4769f25d6d62f94b5a /src/client/app/common/scripts/compose-notification.ts | |
| parent | Add Event activity-type support (#5785) (diff) | |
| download | misskey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.gz misskey-f6154dc0af1a0d65819e87240f4385f9573095cb.tar.bz2 misskey-f6154dc0af1a0d65819e87240f4385f9573095cb.zip | |
v12 (#5712)
Co-authored-by: MeiMei <30769358+mei23@users.noreply.github.com>
Co-authored-by: Satsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>
Diffstat (limited to '')
| -rw-r--r-- | src/client/scripts/compose-notification.ts (renamed from src/client/app/common/scripts/compose-notification.ts) | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/src/client/app/common/scripts/compose-notification.ts b/src/client/scripts/compose-notification.ts index ec854f2f4d..bf32552506 100644 --- a/src/client/app/common/scripts/compose-notification.ts +++ b/src/client/scripts/compose-notification.ts @@ -1,6 +1,5 @@ -import getNoteSummary from '../../../../misc/get-note-summary'; -import getReactionEmoji from '../../../../misc/get-reaction-emoji'; -import getUserName from '../../../../misc/get-user-name'; +import getNoteSummary from '../../misc/get-note-summary'; +import getUserName from '../../misc/get-user-name'; type Notification = { title: string; @@ -20,20 +19,6 @@ export default function(type, data): Notification { icon: data.url }; - case 'unreadMessagingMessage': - return { - title: `New message from ${getUserName(data.user)}`, - body: data.text, // TODO: getMessagingMessageSummary(data), - icon: data.user.avatarUrl - }; - - case 'reversiInvited': - return { - title: 'Play reversi with me', - body: `You got reversi invitation from ${getUserName(data.parent)}`, - icon: data.parent.avatarUrl - }; - case 'notification': switch (data.type) { case 'mention': @@ -59,7 +44,7 @@ export default function(type, data): Notification { case 'reaction': return { - title: `${getUserName(data.user)}: ${getReactionEmoji(data.reaction)}:`, + title: `${getUserName(data.user)}: ${data.reaction}:`, body: getNoteSummary(data.note), icon: data.user.avatarUrl }; |