AdminStore: fix users check

This commit is contained in:
Alex Gleason 2024-06-09 19:48:33 -05:00
parent d1ba797c93
commit e7ed3c839c
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 3 additions and 2 deletions

View File

@ -14,12 +14,13 @@ export class AdminStore implements NStore {
async query(filters: NostrFilter[], opts: { signal?: AbortSignal; limit?: number } = {}): Promise<DittoEvent[]> {
const events = await this.store.query(filters, opts);
const pubkeys = new Set(events.map((event) => event.pubkey));
const users = await this.store.query([{
kinds: [30382],
authors: [Conf.pubkey],
'#d': events.map((event) => event.pubkey),
limit: 1,
'#d': [...pubkeys],
limit: pubkeys.size,
}]);
return events.filter((event) => {