1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-28 13:38:08 +09:00
hotomoe/packages/backend/src/misc/is-blocker-user-related.ts
syuilo 0e4a111f81 refactoring
Resolve #7779
2021-11-12 02:02:25 +09:00

16 lines
340 B
TypeScript

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