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

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

* docs: Update changelog

* Apply suggestions from code review

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
ozelot 2023-11-04 18:45:59 +09:00 committed by GitHub
parent 3642a2b625
commit 1e737dbb94
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -80,6 +80,7 @@
- Fix: アクセストークンを削除すると、通知が取得できなくなる場合がある問題を修正
- Fix: 自身の宛先なしダイレクト投稿がストリーミングで流れてこない問題を修正
- Fix: サーバーサイドからのテスト通知を正しく行えるように修正
- Fix: GTLの「リートを表示」オプションが機能しないのを修正 #12233
## 2023.10.2

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.where('note.renoteId IS NULL');
qb.orWhere(new Brackets(qb => {
qb.where('note.text IS NOT NULL');
qb.orWhere('note.fileIds != \'{}\'');
}));
}));
}
//#endregion
const timeline = await query.limit(ps.limit).getMany();