diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-04-23 18:00:58 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-04-23 18:00:58 +0900 |
| commit | 9e74a3b8fa69d63e8e432c48bafaf880098edf3b (patch) | |
| tree | 3c2391091b0dc451d07656c226c894fc5338e018 /src/server/api/stream | |
| parent | sharedInboxを提供 (diff) | |
| download | sharkey-9e74a3b8fa69d63e8e432c48bafaf880098edf3b.tar.gz sharkey-9e74a3b8fa69d63e8e432c48bafaf880098edf3b.tar.bz2 sharkey-9e74a3b8fa69d63e8e432c48bafaf880098edf3b.zip | |
Refactor
Diffstat (limited to 'src/server/api/stream')
| -rw-r--r-- | src/server/api/stream/home.ts | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/server/api/stream/home.ts b/src/server/api/stream/home.ts index a9d6ff241e..f629278848 100644 --- a/src/server/api/stream/home.ts +++ b/src/server/api/stream/home.ts @@ -32,17 +32,17 @@ export default async function( //#region 流れてきたメッセージがミュートしているユーザーが関わるものだったら無視する if (x.type == 'note') { - if (mutedUserIds.indexOf(x.body.userId) != -1) { + if (mutedUserIds.includes(x.body.userId)) { return; } - if (x.body.reply != null && mutedUserIds.indexOf(x.body.reply.userId) != -1) { + if (x.body.reply != null && mutedUserIds.includes(x.body.reply.userId)) { return; } - if (x.body.renote != null && mutedUserIds.indexOf(x.body.renote.userId) != -1) { + if (x.body.renote != null && mutedUserIds.includes(x.body.renote.userId)) { return; } } else if (x.type == 'notification') { - if (mutedUserIds.indexOf(x.body.userId) != -1) { + if (mutedUserIds.includes(x.body.userId)) { return; } } @@ -53,6 +53,7 @@ export default async function( connection.send(data); } break; + case 'note-stream': const noteId = channel.split(':')[2]; log(`RECEIVED: ${noteId} ${data} by @${user.username}`); |