diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-12 09:21:04 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-10-12 09:21:04 +0900 |
| commit | 7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb (patch) | |
| tree | 4b8e58dcd39d113313866c6b66ecb82c65bb7880 /packages/backend/src/server/api/stream | |
| parent | Merge pull request #11963 from misskey-dev/develop (diff) | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb.tar.gz misskey-7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb.tar.bz2 misskey-7e7138c0eb980d7cb9cb0a68e4f07eb2f0d0daeb.zip | |
Merge pull request #12011 from misskey-dev/develop
Release: 2023.10.1
Diffstat (limited to 'packages/backend/src/server/api/stream')
| -rw-r--r-- | packages/backend/src/server/api/stream/channels/hybrid-timeline.ts | 4 | ||||
| -rw-r--r-- | packages/backend/src/server/api/stream/channels/local-timeline.ts | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts index d5f5d54e46..adedca5152 100644 --- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts @@ -19,6 +19,7 @@ class HybridTimelineChannel extends Channel { public static shouldShare = false; public static requireCredential = true; private withRenotes: boolean; + private withReplies: boolean; private withFiles: boolean; constructor( @@ -39,6 +40,7 @@ class HybridTimelineChannel extends Channel { if (!policies.ltlAvailable) return; this.withRenotes = params.withRenotes ?? true; + this.withReplies = params.withReplies ?? false; this.withFiles = params.withFiles ?? false; // Subscribe events @@ -87,7 +89,7 @@ class HybridTimelineChannel extends Channel { if (isInstanceMuted(note, new Set<string>(this.userProfile!.mutedInstances ?? []))) return; // 関係ない返信は除外 - if (note.reply && !this.following[note.userId]?.withReplies) { + if (note.reply && !this.following[note.userId]?.withReplies && !this.withReplies) { const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) 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 94c22f8915..69aa366f00 100644 --- a/packages/backend/src/server/api/stream/channels/local-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/local-timeline.ts @@ -18,6 +18,7 @@ class LocalTimelineChannel extends Channel { public static shouldShare = false; public static requireCredential = false; private withRenotes: boolean; + private withReplies: boolean; private withFiles: boolean; constructor( @@ -38,6 +39,7 @@ class LocalTimelineChannel extends Channel { if (!policies.ltlAvailable) return; this.withRenotes = params.withRenotes ?? true; + this.withReplies = params.withReplies ?? false; this.withFiles = params.withFiles ?? false; // Subscribe events @@ -66,7 +68,7 @@ class LocalTimelineChannel extends Channel { } // 関係ない返信は除外 - if (note.reply && this.user && !this.following[note.userId]?.withReplies) { + if (note.reply && this.user && !this.following[note.userId]?.withReplies && !this.withReplies) { const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user.id && note.userId !== this.user.id && reply.userId !== note.userId) return; |