fix: response with quote field hydrated in create status

This commit is contained in:
P. Reis 2024-04-16 14:44:04 -03:00
parent 97d2fa1b79
commit e4892c3e4a
1 changed files with 10 additions and 0 deletions

View File

@ -130,6 +130,16 @@ const createStatusController: AppController = async (c) => {
}, c);
const author = await getAuthor(event.pubkey);
if (data.quote_id) {
await hydrateEvents({
events: [event],
relations: ['quote_repost'],
storage: eventsDB,
signal: c.req.raw.signal,
});
}
return c.json(await renderStatus({ ...event, author }, { viewerPubkey: c.get('pubkey') }));
};