Skip to content
Snippets Groups Projects
Commit 9e74a3b8 authored by syuilo's avatar syuilo
Browse files

Refactor

parent 1131ce8a
No related branches found
No related tags found
No related merge requests found
......@@ -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}`);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment