From 664ea1dcf49b0d9f0dd8b5032e8fb1e94dccba47 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Thu, 28 Jul 2022 22:42:40 -0700 Subject: [PATCH] test :( --- .../src/server/api/endpoints/notes/recommended-timeline.ts | 4 +++- .../src/server/api/stream/channels/recommended-timeline.ts | 3 +++ 2 files changed, 6 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 c81921770..d607d3481 100644 --- a/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/recommended-timeline.ts @@ -65,10 +65,12 @@ export default define(meta, paramDef, async (ps, user) => { } } + // AND (note.userHost = ANY(meta.recommendedInstances))') + //#region Construct query const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) - .andWhere('(note.visibility = \'public\' AND (note.userHost = ANY(meta.recommendedInstances))') + .andWhere('(note.visibility = \'public\'') .innerJoinAndSelect('note.user', 'user') .leftJoinAndSelect('user.avatar', 'avatar') .leftJoinAndSelect('user.banner', 'banner') diff --git a/packages/backend/src/server/api/stream/channels/recommended-timeline.ts b/packages/backend/src/server/api/stream/channels/recommended-timeline.ts index 03fc33b3a..b160b813b 100644 --- a/packages/backend/src/server/api/stream/channels/recommended-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/recommended-timeline.ts @@ -26,6 +26,9 @@ export default class extends Channel { private async onNote(note: Packed<'Note'>) { const meta = await fetchMeta(); + console.log(meta.disableRecommendedTimeline); + console.log(meta.recommendedInstances); + console.log(note.user.host); if (note.user.host !== null && !meta.recommendedInstances.includes(note.user.host)) return; if (note.visibility !== 'public') return; if (note.channelId != null && !this.followingChannels.has(note.channelId)) return;