fix(backend): GTLの「リノートを表示」オプションが機能しないのを修正 (#12233)

This commit is contained in:
ozelotdev 2023-11-03 15:44:24 +00:00
parent a8e976d72f
commit 901b404a4a
1 changed files with 10 additions and 0 deletions

View File

@ -87,6 +87,16 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
if (ps.withFiles) {
query.andWhere('note.fileIds != \'{}\'');
}
if (ps.withRenotes === false) {
query.andWhere(new Brackets(qb => {
qb.orWhere('note.renoteId IS NULL');
qb.orWhere(new Brackets(qb => {
qb.orWhere('note.text IS NOT NULL');
qb.orWhere('note.fileIds != \'{}\'');
}));
}));
}
//#endregion
const timeline = await query.limit(ps.limit).getMany();