diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-16 12:16:37 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-05-16 12:16:37 +0900 |
| commit | d10d5a8d53fd214ca75613f73bb7149632ec9cf9 (patch) | |
| tree | e269a2891febec43b6f24476624edf1feafd833b /packages/backend/src/server/api/stream/channels/global-timeline.ts | |
| parent | refactor(frontend): boot分割したり副作用減らしたりとか (diff) | |
| download | sharkey-d10d5a8d53fd214ca75613f73bb7149632ec9cf9.tar.gz sharkey-d10d5a8d53fd214ca75613f73bb7149632ec9cf9.tar.bz2 sharkey-d10d5a8d53fd214ca75613f73bb7149632ec9cf9.zip | |
enhance: タイムラインにフォロイーの行った他人へのリプライを含めるかどうかの設定をアカウントに保存するのをやめるように
Resolve #10646
Diffstat (limited to 'packages/backend/src/server/api/stream/channels/global-timeline.ts')
| -rw-r--r-- | packages/backend/src/server/api/stream/channels/global-timeline.ts | 5 |
1 files changed, 4 insertions, 1 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 5454836fe1..d3339072c1 100644 --- a/packages/backend/src/server/api/stream/channels/global-timeline.ts +++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts @@ -13,6 +13,7 @@ class GlobalTimelineChannel extends Channel { public readonly chName = 'globalTimeline'; public static shouldShare = true; public static requireCredential = false; + private withReplies: boolean; constructor( private metaService: MetaService, @@ -31,6 +32,8 @@ class GlobalTimelineChannel extends Channel { const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null); if (!policies.gtlAvailable) return; + this.withReplies = params.withReplies as boolean; + // Subscribe events this.subscriber.on('notesStream', this.onNote); } @@ -54,7 +57,7 @@ class GlobalTimelineChannel extends Channel { } // 関係ない返信は除外 - if (note.reply && !this.user!.showTimelineReplies) { + if (note.reply && !this.withReplies) { const reply = note.reply; // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return; |