From 30a5d9a20fb1b898defcbd9b75bd686fb5759d61 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Mon, 14 Oct 2024 16:24:13 -0500 Subject: [PATCH] webpush: fix query error in pipeline --- src/pipeline.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/pipeline.ts b/src/pipeline.ts index 29498417..5549193c 100644 --- a/src/pipeline.ts +++ b/src/pipeline.ts @@ -239,11 +239,16 @@ async function webPush(event: NostrEvent): Promise { } const kysely = await Storages.kysely(); + const pubkeys = getTagSet(event.tags, 'p'); + + if (!pubkeys.size) { + return; + } const rows = await kysely .selectFrom('push_subscriptions') .selectAll() - .where('pubkey', 'in', [...getTagSet(event.tags, 'p')]) + .where('pubkey', 'in', [...pubkeys]) .execute(); for (const row of rows) {