summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorozelot <contact@ozelot.dev>2023-11-04 18:45:59 +0900
committerGitHub <noreply@github.com>2023-11-04 18:45:59 +0900
commit1e737dbb94ac856be7cc68e834f99e0bb759cf41 (patch)
treec70ac8358f6692cf802ae45ddfd2a740aa9f9eed
parentNew Crowdin updates (#12231) (diff)
downloadmisskey-1e737dbb94ac856be7cc68e834f99e0bb759cf41.tar.gz
misskey-1e737dbb94ac856be7cc68e834f99e0bb759cf41.tar.bz2
misskey-1e737dbb94ac856be7cc68e834f99e0bb759cf41.zip
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>
-rw-r--r--CHANGELOG.md1
-rw-r--r--packages/backend/src/server/api/endpoints/notes/global-timeline.ts10
2 files changed, 11 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 4038755124..9a10167418 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -80,6 +80,7 @@
- Fix: アクセストークンを削除すると、通知が取得できなくなる場合がある問題を修正
- Fix: 自身の宛先なしダイレクト投稿がストリーミングで流れてこない問題を修正
- Fix: サーバーサイドからのテスト通知を正しく行えるように修正
+- Fix: GTLの「リノートを表示」オプションが機能しないのを修正 #12233
## 2023.10.2
diff --git a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
index be7557c213..68fefa5b58 100644
--- a/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/global-timeline.ts
@@ -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();