1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-09 11:23:14 +09:00
cherrypick/packages/backend/src/misc/is-user-related.ts

16 lines
305 B
TypeScript
Raw Normal View History

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