diff --git a/main.tsx b/main.tsx index 482361d..90b7898 100644 --- a/main.tsx +++ b/main.tsx @@ -173,7 +173,7 @@ const root_handler = ( } & EventReadWriter, ) => async (req: Request, info: Deno.ServeHandlerInfo) => { - console.log(req) + console.log(req); const { pathname, protocol } = new URL(req.url); if (pathname === "/api/auth/login") { const body = await req.json(); diff --git a/ws.ts b/ws.ts index f53288b..8666f9a 100644 --- a/ws.ts +++ b/ws.ts @@ -208,10 +208,13 @@ async function handle_cmd_req( const sub_id = nostr_ws_msg[1]; const filters = nostr_ws_msg.slice(2) as NostrFilter[]; - const subscriptions = args.connections.get(this_socket) - if(subscriptions) { - if(subscriptions.size > 10) { - send(this_socket, JSON.stringify(respond_notice(`${sub_id}:only accept at most 10 subscriptions`))); + const subscriptions = args.connections.get(this_socket); + if (subscriptions) { + if (subscriptions.size > 10) { + send( + this_socket, + JSON.stringify(respond_notice(`${sub_id}:only accept at most 10 subscriptions`)), + ); return; } subscriptions.set( @@ -273,7 +276,6 @@ async function handle_filter( } if (filter.authors) { if (event_candidates.size > 0) { - } else { const events = args.get_events_by_authors(new Set(filter.authors)); for await (const event of events) {