refactor(MuteListPolicy): human lint preference

This commit is contained in:
P. Reis 2024-05-10 14:37:02 -03:00
parent 86518dbac5
commit 4069ddc02c
1 changed files with 2 additions and 2 deletions

View File

@ -6,8 +6,8 @@ export class MuteListPolicy implements NPolicy {
constructor(private pubkey: string, private store: NStore) {}
async call(event: NostrEvent): Promise<NostrRelayOK> {
const allowEvent = ['OK', event.id, true, ''] as NostrRelayOK;
const blockEvent = ['OK', event.id, false, 'You are banned in this server.'] as NostrRelayOK;
const allowEvent: NostrRelayOK = ['OK', event.id, true, ''];
const blockEvent: NostrRelayOK = ['OK', event.id, false, 'You are banned in this server.'];
const [muteList] = await this.store.query([{ authors: [this.pubkey], kinds: [10000], limit: 1 }]);
if (!muteList) return allowEvent;