From fdb720386da698a2ca9cd15b8f3ece5ed1187d72 Mon Sep 17 00:00:00 2001 From: "P. Reis" Date: Sun, 23 Jun 2024 23:51:10 -0300 Subject: [PATCH] fix(handleZaps): reject all kinds but 9735 --- src/pipeline.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pipeline.ts b/src/pipeline.ts index 4c942913..a8d98acd 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -228,6 +228,8 @@ async function generateSetEvents(event: NostrEvent): Promise { /** Stores the event in the 'event_zaps' table */ async function handleZaps(kysely: Kysely, event: NostrEvent) { + if (event.kind !== 9735) return; + const zapRequestString = event?.tags?.find(([name]) => name === 'description')?.[1]; if (!zapRequestString) return; const zapRequest = n.json().pipe(n.event()).optional().catch(undefined).parse(zapRequestString);