mirror of
https://iceshrimp.dev/iceshrimp/iceshrimp
synced 2024-12-19 17:18:12 +09:00
16 lines
340 B
TypeScript
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;
|
||
|
}
|