mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 03:19:46 +00:00
EventsDB: fix domain query with authors
This commit is contained in:
parent
6171a321e2
commit
d52e717fb2
1 changed files with 2 additions and 2 deletions
|
|
@ -321,13 +321,13 @@ class EventsDB extends NPostgres {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (domains.size) {
|
if (domains.size) {
|
||||||
const query = this.opts.kysely
|
let query = this.opts.kysely
|
||||||
.selectFrom('pubkey_domains')
|
.selectFrom('pubkey_domains')
|
||||||
.select('pubkey')
|
.select('pubkey')
|
||||||
.where('domain', 'in', [...domains]);
|
.where('domain', 'in', [...domains]);
|
||||||
|
|
||||||
if (filter.authors) {
|
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));
|
const pubkeys = await query.execute().then((rows) => rows.map((row) => row.pubkey));
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue