webpush: fix query error in pipeline

This commit is contained in:
Alex Gleason 2024-10-14 16:24:13 -05:00
parent 94d8d43d78
commit 30a5d9a20f
No known key found for this signature in database
GPG key ID: 7211D1F99744FBB7

View file

@ -239,11 +239,16 @@ async function webPush(event: NostrEvent): Promise<void> {
}
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) {