Fix: shouldFallbackToDbがすでにtrueの場合にそれが無視される

This commit is contained in:
taichanne30 2024-07-25 14:30:10 +09:00
parent 6cc0138d1e
commit 685fc2bd9d
No known key found for this signature in database
GPG Key ID: 1D5EE39F870DC283

View File

@ -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);