summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-04-07 16:39:03 +0900
committersyuilo <4439005+syuilo@users.noreply.github.com>2025-04-07 16:39:03 +0900
commit5b0f594f15c8ebc6f4f2082f841ab291d6c573c0 (patch)
treefb9ecc63928c77a333acc6887800bf3142b0b14f /packages/backend/src/server/api/stream
parentrefactor serach index generator code (#15772) (diff)
downloadmisskey-5b0f594f15c8ebc6f4f2082f841ab291d6c573c0.tar.gz
misskey-5b0f594f15c8ebc6f4f2082f841ab291d6c573c0.tar.bz2
misskey-5b0f594f15c8ebc6f4f2082f841ab291d6c573c0.zip
fix(backend): 非ログインでタイムラインのストリームに接続した際、表示にログイン必須のノートが流れる場合がある問題を修正
Diffstat (limited to 'packages/backend/src/server/api/stream')
-rw-r--r--packages/backend/src/server/api/stream/channels/global-timeline.ts2
-rw-r--r--packages/backend/src/server/api/stream/channels/local-timeline.ts2
2 files changed, 4 insertions, 0 deletions
diff --git a/packages/backend/src/server/api/stream/channels/global-timeline.ts b/packages/backend/src/server/api/stream/channels/global-timeline.ts
index 4f64ce6866..795980821b 100644
--- a/packages/backend/src/server/api/stream/channels/global-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts
@@ -51,6 +51,8 @@ class GlobalTimelineChannel extends Channel {
if (note.visibility !== 'public') return;
if (note.channelId != null) return;
if (note.user.requireSigninToViewContents && this.user == null) return;
+ if (note.renote && note.renote.user.requireSigninToViewContents && this.user == null) return;
+ if (note.reply && note.reply.user.requireSigninToViewContents && this.user == null) return;
if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return;
diff --git a/packages/backend/src/server/api/stream/channels/local-timeline.ts b/packages/backend/src/server/api/stream/channels/local-timeline.ts
index c3cf78a24a..2984e18774 100644
--- a/packages/backend/src/server/api/stream/channels/local-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts
@@ -54,6 +54,8 @@ class LocalTimelineChannel extends Channel {
if (note.visibility !== 'public') return;
if (note.channelId != null) return;
if (note.user.requireSigninToViewContents && this.user == null) return;
+ if (note.renote && note.renote.user.requireSigninToViewContents && this.user == null) return;
+ if (note.reply && note.reply.user.requireSigninToViewContents && this.user == null) return;
// 関係ない返信は除外
if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) {