summaryrefslogtreecommitdiff
path: root/src/server/api/stream/channels
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2020-02-13 22:13:24 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2020-02-13 22:13:24 +0900
commitd76fceae855385ee2a9394ab69058efab169eab1 (patch)
tree6b97d7502ed3e660b8260b97e5608a9b5d782bfa /src/server/api/stream/channels
parent:art: (diff)
downloadsharkey-d76fceae855385ee2a9394ab69058efab169eab1.tar.gz
sharkey-d76fceae855385ee2a9394ab69058efab169eab1.tar.bz2
sharkey-d76fceae855385ee2a9394ab69058efab169eab1.zip
Fix #5935
Diffstat (limited to 'src/server/api/stream/channels')
-rw-r--r--src/server/api/stream/channels/global-timeline.ts6
-rw-r--r--src/server/api/stream/channels/home-timeline.ts6
-rw-r--r--src/server/api/stream/channels/hybrid-timeline.ts6
-rw-r--r--src/server/api/stream/channels/local-timeline.ts6
4 files changed, 24 insertions, 0 deletions
diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts
index 1271aae3a2..a3ecf8e706 100644
--- a/src/server/api/stream/channels/global-timeline.ts
+++ b/src/server/api/stream/channels/global-timeline.ts
@@ -38,6 +38,12 @@ export default class extends Channel {
});
}
+ // 関係ない返信は除外
+ if (note.reply) {
+ // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
+ if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return;
+ }
+
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts
index 9aa4dc1c0f..3cf57c294c 100644
--- a/src/server/api/stream/channels/home-timeline.ts
+++ b/src/server/api/stream/channels/home-timeline.ts
@@ -43,6 +43,12 @@ export default class extends Channel {
}
}
+ // 関係ない返信は除外
+ if (note.reply) {
+ // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
+ if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return;
+ }
+
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts
index e32f4111c2..40686f4b28 100644
--- a/src/server/api/stream/channels/hybrid-timeline.ts
+++ b/src/server/api/stream/channels/hybrid-timeline.ts
@@ -52,6 +52,12 @@ export default class extends Channel {
}
}
+ // 関係ない返信は除外
+ if (note.reply) {
+ // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
+ if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return;
+ }
+
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;
diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts
index e31e5c59cb..4b7f74e4f7 100644
--- a/src/server/api/stream/channels/local-timeline.ts
+++ b/src/server/api/stream/channels/local-timeline.ts
@@ -40,6 +40,12 @@ export default class extends Channel {
});
}
+ // 関係ない返信は除外
+ if (note.reply) {
+ // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
+ if (note.reply.userId !== this.user!.id && note.userId !== this.user!.id && note.reply.userId !== note.userId) return;
+ }
+
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (shouldMuteThisNote(note, this.muting)) return;