lint
This commit is contained in:
parent
1ed06e490c
commit
567c550120
13 changed files with 28 additions and 31 deletions
|
|
@ -1,15 +1,15 @@
|
|||
import { Packed } from './schema.js';
|
||||
import type { Packed } from './schema.js';
|
||||
|
||||
export function isInstanceMuted(note: Packed<'Note'>, mutedInstances: Set<string>): boolean {
|
||||
if (mutedInstances.has(note?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(note?.reply?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(note?.renote?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(note.user.host ?? '')) return true;
|
||||
if (mutedInstances.has(note.reply?.user.host ?? '')) return true;
|
||||
if (mutedInstances.has(note.renote?.user.host ?? '')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
export function isUserFromMutedInstance(notif: Packed<'Notification'>, mutedInstances: Set<string>): boolean {
|
||||
if (mutedInstances.has(notif?.user?.host ?? '')) return true;
|
||||
if (mutedInstances.has(notif.user?.host ?? '')) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue