renderStatus: don't fetch the author, expect it to be passed in

This commit is contained in:
Alex Gleason
2023-12-06 12:04:24 -06:00
parent 7d2813b214
commit a6947441fc
10 changed files with 40 additions and 29 deletions

View File

@@ -34,7 +34,10 @@ const hashtagTimelineController: AppController = (c) => {
/** Render statuses for timelines. */
async function renderStatuses(c: AppContext, filters: DittoFilter<1>[]) {
const events = await mixer.getFilters(filters, { timeout: Time.seconds(1) });
const events = await mixer.getFilters(
filters.map((filter) => ({ ...filter, relations: ['author'] })),
{ timeout: Time.seconds(1) },
);
if (!events.length) {
return c.json([]);