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:
commit
b54d044550
|
@ -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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue