1
0
mirror of https://github.com/misskey-dev/misskey synced 2024-12-30 06:28:31 +09:00
misskey/src/misc/should-mute-this-note.ts

16 lines
346 B
TypeScript
Raw Normal View History

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;
}