From 431d8c7802df0df8863211fd797a2eb073be7229 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 19 Oct 2023 16:22:19 +0900 Subject: [PATCH] =?UTF-8?q?fix(backend):=20Redis=E3=81=8C=E3=81=8B?= =?UTF-8?q?=E3=82=89=E3=81=AE=E3=81=A8=E3=81=8D=E3=81=ABhybrid-timeline?= =?UTF-8?q?=E3=81=ABwithReplies=20=3D=20true=E3=81=A7=E3=82=A2=E3=82=AF?= =?UTF-8?q?=E3=82=BB=E3=82=B9=E3=81=99=E3=82=8B=E3=81=A8SQL=E3=81=AE?= =?UTF-8?q?=E3=82=B7=E3=83=B3=E3=82=BF=E3=83=83=E3=82=AF=E3=82=B9=E3=82=A8?= =?UTF-8?q?=E3=83=A9=E3=83=BC=E3=81=AB=E3=81=AA=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix #12064 --- .../backend/src/server/api/endpoints/notes/hybrid-timeline.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts index 9986c6e436..f8a7a6a8b7 100644 --- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts +++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts @@ -123,6 +123,8 @@ export default class extends Endpoint { // eslint- noteIds.sort((a, b) => a > b ? -1 : 1); noteIds = noteIds.slice(0, ps.limit); + shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0); + if (!shouldFallbackToDb) { const query = this.notesRepository.createQueryBuilder('note') .where('note.id IN (:...noteIds)', { noteIds: noteIds })