Skip to content

Commit 0dd7357

Browse files
syuilotempei-kishi
authored andcommitted
fix(backend): 非ログインでタイムラインのストリームに接続した際、表示にログイン必須のノートが流れる場合がある問題を修正
1 parent 826e4cd commit 0dd7357

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

packages/backend/src/server/api/stream/channels/global-timeline.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ class GlobalTimelineChannel extends Channel {
5151
if (note.visibility !== 'public') return;
5252
if (note.channelId != null) return;
5353
if (note.user.requireSigninToViewContents && this.user == null) return;
54+
if (note.renote && note.renote.user.requireSigninToViewContents && this.user == null) return;
55+
if (note.reply && note.reply.user.requireSigninToViewContents && this.user == null) return;
5456

5557
if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return;
5658

packages/backend/src/server/api/stream/channels/local-timeline.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ class LocalTimelineChannel extends Channel {
5454
if (note.visibility !== 'public') return;
5555
if (note.channelId != null) return;
5656
if (note.user.requireSigninToViewContents && this.user == null) return;
57+
if (note.renote && note.renote.user.requireSigninToViewContents && this.user == null) return;
58+
if (note.reply && note.reply.user.requireSigninToViewContents && this.user == null) return;
5759

5860
// 関係ない返信は除外
5961
if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) {

0 commit comments

Comments
 (0)