1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-12-17 16:18:23 +09:00
MisskeyIO/packages/backend/src/misc/is-muted-user-related.ts
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00

16 lines
330 B
TypeScript

export function isMutedUserRelated(note: any, mutedUserIds: Set<string>): boolean {
if (mutedUserIds.has(note.userId)) {
return true;
}
if (note.reply != null && mutedUserIds.has(note.reply.userId)) {
return true;
}
if (note.renote != null && mutedUserIds.has(note.renote.userId)) {
return true;
}
return false;
}