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) {