From 991fa054a6844e16b22cb8e89d78af04a8df078e Mon Sep 17 00:00:00 2001
From: anatawa12 <anatawa12@icloud.com>
Date: Thu, 19 Oct 2023 19:34:52 +0900
Subject: [PATCH] =?UTF-8?q?chore:=20STL=E3=81=AEdb=20fallback=E3=81=A7with?=
 =?UTF-8?q?Replies=E3=81=8Ctrue=E3=81=AE=E3=81=A8=E3=81=8D=E3=81=AB?=
 =?UTF-8?q?=E3=81=99=E3=81=B9=E3=81=A6=E3=81=AE=E3=83=AA=E3=83=97=E3=83=A9?=
 =?UTF-8?q?=E3=82=A4=E3=82=92=E9=99=A4=E5=A4=96=E3=81=97=E3=81=AA=E3=81=84?=
 =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=20(#12075)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

MiFollowingを見るのは実装コストが高いため現状実装していない

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
---
 .../api/endpoints/notes/hybrid-timeline.ts    | 20 ++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
index f8a7a6a8b7..cbab13f30d 100644
--- a/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
+++ b/packages/backend/src/server/api/endpoints/notes/hybrid-timeline.ts
@@ -182,15 +182,17 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
 					.leftJoinAndSelect('reply.user', 'replyUser')
 					.leftJoinAndSelect('renote.user', 'renoteUser');
 
-				query.andWhere(new Brackets(qb => {
-					qb
-						.where('note.replyId IS NULL') // 返信ではない
-						.orWhere(new Brackets(qb => {
-							qb // 返信だけど投稿者自身への返信
-								.where('note.replyId IS NOT NULL')
-								.andWhere('note.replyUserId = note.userId');
-						}));
-				}));
+				if (!ps.withReplies) {
+					query.andWhere(new Brackets(qb => {
+						qb
+							.where('note.replyId IS NULL') // 返信ではない
+							.orWhere(new Brackets(qb => {
+								qb // 返信だけど投稿者自身への返信
+									.where('note.replyId IS NOT NULL')
+									.andWhere('note.replyUserId = note.userId');
+							}));
+					}));
+				}
 
 				this.queryService.generateVisibilityQuery(query, me);
 				this.queryService.generateMutedUserQuery(query, me);
-- 
GitLab