From 685fc2bd9d2283ac2a04894ec7e50adc1e4c3e5d Mon Sep 17 00:00:00 2001 From: taichanne30 Date: Thu, 25 Jul 2024 14:30:10 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20shouldFallbackToDb=E3=81=8C=E3=81=99?= =?UTF-8?q?=E3=81=A7=E3=81=ABtrue=E3=81=AE=E5=A0=B4=E5=90=88=E3=81=AB?= =?UTF-8?q?=E3=81=9D=E3=82=8C=E3=81=8C=E7=84=A1=E8=A6=96=E3=81=95=E3=82=8C?= =?UTF-8?q?=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/FanoutTimelineEndpointService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/FanoutTimelineEndpointService.ts b/packages/backend/src/core/FanoutTimelineEndpointService.ts index ff8b22bde9..55ef7abf3c 100644 --- a/packages/backend/src/core/FanoutTimelineEndpointService.ts +++ b/packages/backend/src/core/FanoutTimelineEndpointService.ts @@ -75,7 +75,7 @@ export class FanoutTimelineEndpointService { let noteIds = redisResultIds.filter(id => id >= thresholdId).slice(0, ps.limit); const oldestNoteId = ascending ? redisResultIds[0] : redisResultIds[redisResultIds.length - 1]; - shouldFallbackToDb = noteIds.length === 0 || ps.sinceId != null && ps.sinceId < oldestNoteId; + shouldFallbackToDb ||= noteIds.length === 0 || ps.sinceId != null && ps.sinceId < oldestNoteId; if (!shouldFallbackToDb) { let filter = ps.noteFilter ?? (_note => true);