1
1
mirror of https://github.com/kokonect-link/cherrypick synced 2025-01-21 01:04:29 +09:00
cherrypick/src/misc/is-muted-user-related.ts

16 lines
330 B
TypeScript
Raw Normal View History

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