Merge branch 'refactor-hydrate-repost' into 'main'

refactor: hydrate authors through hydrateEvents() call

See merge request soapbox-pub/ditto!158
This commit is contained in:
Alex Gleason 2024-04-15 13:52:58 +00:00
commit b54d044550
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ async function hydrateRepostEvents(opts: Omit<HydrateEventOpts, 'relations'>): P
const originalPostEvent = results.find((event) => event.id === originalPostId); const originalPostEvent = results.find((event) => event.id === originalPostId);
if (!originalPostEvent) continue; if (!originalPostEvent) continue;
await hydrateAuthors({ events: [originalPostEvent], storage: storage, signal: signal }); await hydrateEvents({ events: [originalPostEvent], storage: storage, signal: signal, relations: ['author'] });
event.repost = originalPostEvent; event.repost = originalPostEvent;
} }
} }