nameRequestsController: display only owned 3036 events

This commit is contained in:
Alex Gleason 2024-06-13 16:54:03 -05:00
parent e912210589
commit 100a5056eb
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 5 additions and 1 deletions

View File

@ -126,7 +126,11 @@ export const nameRequestsController: AppController = async (c) => {
}
}
const events = await store.query([{ kinds: [3036], ids: [...ids] }])
if (ids.size === 0) {
return c.json([]);
}
const events = await store.query([{ kinds: [3036], ids: [...ids], authors: [pubkey] }])
.then((events) => hydrateEvents({ store, events: events, signal: c.req.raw.signal }));
const nameRequests = await Promise.all(