1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-02 07:25:49 +02:00

Refactor: Extract shouldMuteThisNote function

This commit is contained in:
syuilo
2018-09-17 23:07:15 +09:00
parent 311b4e90ca
commit 44f6fe6f1f
6 changed files with 29 additions and 53 deletions

View File

@@ -0,0 +1,15 @@
export default function(note: any, mutedUserIds: string[]): boolean {
if (mutedUserIds.indexOf(note.userId) != -1) {
return true;
}
if (note.reply != null && mutedUserIds.indexOf(note.reply.userId) != -1) {
return true;
}
if (note.renote != null && mutedUserIds.indexOf(note.renote.userId) != -1) {
return true;
}
return false;
}