Fix: shouldFallbackToDbがすでにtrueの場合にそれが無視される
This commit is contained in:
parent
6cc0138d1e
commit
685fc2bd9d
|
@ -75,7 +75,7 @@ export class FanoutTimelineEndpointService {
|
||||||
let noteIds = redisResultIds.filter(id => id >= thresholdId).slice(0, ps.limit);
|
let noteIds = redisResultIds.filter(id => id >= thresholdId).slice(0, ps.limit);
|
||||||
|
|
||||||
const oldestNoteId = ascending ? redisResultIds[0] : redisResultIds[redisResultIds.length - 1];
|
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) {
|
if (!shouldFallbackToDb) {
|
||||||
let filter = ps.noteFilter ?? (_note => true);
|
let filter = ps.noteFilter ?? (_note => true);
|
||||||
|
|
Loading…
Reference in New Issue