mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 00:13:09 +02:00
15 lines
305 B
TypeScript
15 lines
305 B
TypeScript
export function isUserRelated(note: any, userIds: Set<string>): boolean {
|
|
if (userIds.has(note.userId)) {
|
|
return true;
|
|
}
|
|
|
|
if (note.reply != null && userIds.has(note.reply.userId)) {
|
|
return true;
|
|
}
|
|
|
|
if (note.renote != null && userIds.has(note.renote.userId)) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|