From 4069ddc02c82d2f53df49671a4e0a8febfda3755 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Fri, 10 May 2024 14:37:02 -0300 Subject: [PATCH] refactor(MuteListPolicy): human lint preference --- src/policies/MuteListPolicy.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/policies/MuteListPolicy.ts b/src/policies/MuteListPolicy.ts index c069565..f9f8de2 100644 --- a/src/policies/MuteListPolicy.ts +++ b/src/policies/MuteListPolicy.ts @@ -6,8 +6,8 @@ export class MuteListPolicy implements NPolicy { constructor(private pubkey: string, private store: NStore) {} async call(event: NostrEvent): Promise { - 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;