mirror of
https://github.com/aljazceru/ditto.git
synced 2025-12-17 05:24:22 +01:00
EventsDB: fix domain query with authors
This commit is contained in:
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user