summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream/channels/global-timeline.ts
diff options
context:
space:
mode:
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.ts11
1 files changed, 1 insertions, 10 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 fef52b6856..f0ac50349c 100644
--- a/packages/backend/src/server/api/stream/channels/global-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/global-timeline.ts
@@ -18,7 +18,6 @@ class GlobalTimelineChannel extends Channel {
public readonly chName = 'globalTimeline';
public static shouldShare = true;
public static requireCredential = false;
- private withReplies: boolean;
private withRenotes: boolean;
constructor(
@@ -38,7 +37,6 @@ class GlobalTimelineChannel extends Channel {
const policies = await this.roleService.getUserPolicies(this.user ? this.user.id : null);
if (!policies.gtlAvailable) return;
- this.withReplies = params.withReplies ?? false;
this.withRenotes = params.withRenotes ?? true;
// Subscribe events
@@ -64,7 +62,7 @@ class GlobalTimelineChannel extends Channel {
}
// 関係ない返信は除外
- if (note.reply && !this.withReplies) {
+ if (note.reply && !this.following[note.userId]?.withReplies) {
const reply = note.reply;
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && note.userId !== this.user!.id && reply.userId !== note.userId) return;
@@ -82,13 +80,6 @@ class GlobalTimelineChannel extends Channel {
if (note.renote && !note.text && isUserRelated(note, this.userIdsWhoMeMutingRenotes)) return;
- // 流れてきたNoteがミュートすべきNoteだったら無視する
- // TODO: 将来的には、単にMutedNoteテーブルにレコードがあるかどうかで判定したい(以下の理由により難しそうではある)
- // 現状では、ワードミュートにおけるMutedNoteレコードの追加処理はストリーミングに流す処理と並列で行われるため、
- // レコードが追加されるNoteでも追加されるより先にここのストリーミングの処理に到達することが起こる。
- // そのためレコードが存在するかのチェックでは不十分なので、改めてcheckWordMuteを呼んでいる
- if (this.userProfile && await checkWordMute(note, this.user, this.userProfile.mutedWords)) return;
-
this.connection.cacheNote(note);
this.send('note', note);