From d52e717fb277a00d04cdfb976860b04ebff37f1b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sun, 27 Oct 2024 10:02:28 -0500 Subject: [PATCH] EventsDB: fix domain query with authors --- src/storages/EventsDB.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storages/EventsDB.ts b/src/storages/EventsDB.ts index 591a1376..208e0c72 100644 --- a/src/storages/EventsDB.ts +++ b/src/storages/EventsDB.ts @@ -321,13 +321,13 @@ class EventsDB extends NPostgres { } if (domains.size) { - const query = this.opts.kysely + let query = this.opts.kysely .selectFrom('pubkey_domains') .select('pubkey') .where('domain', 'in', [...domains]); if (filter.authors) { - query.where('pubkey', 'in', filter.authors); + query = query.where('pubkey', 'in', filter.authors); } const pubkeys = await query.execute().then((rows) => rows.map((row) => row.pubkey));