mirror of
https://iceshrimp.dev/crimekillz/trashposs
synced 2024-11-23 17:29:05 +01:00
Refactor
This commit is contained in:
parent
a01cbf026c
commit
38405c33e1
@ -32,17 +32,17 @@ export default async function(
|
|||||||
|
|
||||||
//#region 流れてきたメッセージがミュートしているユーザーが関わるものだったら無視する
|
//#region 流れてきたメッセージがミュートしているユーザーが関わるものだったら無視する
|
||||||
if (x.type == 'note') {
|
if (x.type == 'note') {
|
||||||
if (mutedUserIds.indexOf(x.body.userId) != -1) {
|
if (mutedUserIds.includes(x.body.userId)) {
|
||||||
return;
|
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;
|
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;
|
return;
|
||||||
}
|
}
|
||||||
} else if (x.type == 'notification') {
|
} else if (x.type == 'notification') {
|
||||||
if (mutedUserIds.indexOf(x.body.userId) != -1) {
|
if (mutedUserIds.includes(x.body.userId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -53,6 +53,7 @@ export default async function(
|
|||||||
connection.send(data);
|
connection.send(data);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'note-stream':
|
case 'note-stream':
|
||||||
const noteId = channel.split(':')[2];
|
const noteId = channel.split(':')[2];
|
||||||
log(`RECEIVED: ${noteId} ${data} by @${user.username}`);
|
log(`RECEIVED: ${noteId} ${data} by @${user.username}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user