mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-15 06:03:10 +02:00
0e4a111f81
Resolve #7779
15 lines
330 B
TypeScript
15 lines
330 B
TypeScript
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;
|
|
}
|