summaryrefslogtreecommitdiff
path: root/packages/backend/src/server/api/stream
diff options
context:
space:
mode:
authorzyoshoka <107108195+zyoshoka@users.noreply.github.com>2024-02-28 17:43:17 +0900
committerGitHub <noreply@github.com>2024-02-28 17:43:17 +0900
commit664aeb3ced65f3911c8a21c2d5ffbd1035aec31a (patch)
tree59668cf9cec5f1297dba78d7792aaa621c5ef64f /packages/backend/src/server/api/stream
parentrefactor(backend): ノートのエクスポート処理でStreams APIを使... (diff)
downloadsharkey-664aeb3ced65f3911c8a21c2d5ffbd1035aec31a.tar.gz
sharkey-664aeb3ced65f3911c8a21c2d5ffbd1035aec31a.tar.bz2
sharkey-664aeb3ced65f3911c8a21c2d5ffbd1035aec31a.zip
fix(backend): リノート時のHTLへのストリーミングの意図しない挙動を修正 (#13425)
* fix(backend): リノート時のストリーミングの意図しない挙動を修正 * Update CHANGELOG.md * fix: 不要な返り値 * fix: 不適切な条件分岐を修正 * test(backend): add htl tests --------- Co-authored-by: syuilo <4439005+syuilo@users.noreply.github.com>
Diffstat (limited to 'packages/backend/src/server/api/stream')
-rw-r--r--packages/backend/src/server/api/stream/channels/home-timeline.ts10
1 files changed, 9 insertions, 1 deletions
diff --git a/packages/backend/src/server/api/stream/channels/home-timeline.ts b/packages/backend/src/server/api/stream/channels/home-timeline.ts
index ce9d7f5647..f45bf8622e 100644
--- a/packages/backend/src/server/api/stream/channels/home-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/home-timeline.ts
@@ -71,7 +71,15 @@ class HomeTimelineChannel extends Channel {
}
}
- if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && !this.withRenotes) return;
+ // 純粋なリノート(引用リノートでないリノート)の場合
+ if (note.renote && note.text == null && (note.fileIds == null || note.fileIds.length === 0) && note.poll == null) {
+ if (!this.withRenotes) return;
+ if (note.renote.reply) {
+ const reply = note.renote.reply;
+ // 自分のフォローしていないユーザーの visibility: followers な投稿への返信のリノートは弾く
+ if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return;
+ }
+ }
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
if (isUserRelated(note, this.userIdsWhoMeMuting)) return;