fix: event deconstruct inside getAuthor

This commit is contained in:
P. Reis 2024-04-03 18:05:07 -03:00
parent 8c18a284b7
commit 152e06ce3c
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ const getAuthor = async (pubkey: string, opts: GetEventOpts = {}): Promise<Nostr
const { relations = [], signal = AbortSignal.timeout(1000) } = opts;
return await optimizer.query([{ authors: [pubkey], kinds: [0], limit: 1 }], { limit: 1, signal })
.then(([event]) => hydrateEvents({ events: [event], relations, storage: optimizer, signal }))
.then((events) => hydrateEvents({ events, relations, storage: optimizer, signal }))
.then(([event]) => event);
};