From b53bbc960fcc83ba3f949f4ae5b6806ffa90e3b1 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Fri, 29 Jul 2022 00:28:21 -0700 Subject: [PATCH] im stuff --- .../src/server/api/endpoints/notes/recommended-timeline.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts index eb4b9e5a96..866eb4e1cd 100644 --- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts @@ -59,6 +59,7 @@ export const paramDef = { // eslint-disable-next-line import/no-default-export export default define(meta, paramDef, async (ps, user) => { const m = await fetchMeta(); + const instances = m.recommendedInstances; if (m.disableRecommendedTimeline) { if (user == null || (!user.isAdmin && !user.isModerator)) { throw new ApiError(meta.errors.rtlDisabled); @@ -69,7 +70,7 @@ export default define(meta, paramDef, async (ps, user) => { const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) .andWhere('(note.visibility = \'public\')') - .andWhere('(note.userHost IN :instances) OR (note.userHost IS NULL)', { instances: m.recommendedInstances }) + .andWhere('(note.userHost IN :instances) OR (note.userHost IS NULL)', { instances: instances }) .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('user.avatar', 'avatar') .leftJoinAndSelect('user.banner', 'banner')