fix(backend): Redisがからのときにhybrid-timelineにwithReplies = trueでアクセスするとSQLのシンタックスエラーになる

Fix #12064
This commit is contained in:
syuilo 2023-10-19 16:22:19 +09:00
parent f85a655915
commit 431d8c7802
1 changed files with 2 additions and 0 deletions

View File

@ -123,6 +123,8 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
noteIds.sort((a, b) => a > b ? -1 : 1); noteIds.sort((a, b) => a > b ? -1 : 1);
noteIds = noteIds.slice(0, ps.limit); noteIds = noteIds.slice(0, ps.limit);
shouldFallbackToDb = shouldFallbackToDb || (noteIds.length === 0);
if (!shouldFallbackToDb) { if (!shouldFallbackToDb) {
const query = this.notesRepository.createQueryBuilder('note') const query = this.notesRepository.createQueryBuilder('note')
.where('note.id IN (:...noteIds)', { noteIds: noteIds }) .where('note.id IN (:...noteIds)', { noteIds: noteIds })