fix(stream): チャンネル接続主に見えないはずのノートが表示される問題を修正

This commit is contained in:
まっちゃとーにゅ 2024-01-23 23:20:34 +09:00
parent 464884c1ab
commit 1dde8653e8
No known key found for this signature in database
GPG key ID: 143DE582A97FE052
9 changed files with 60 additions and 6 deletions

View file

@ -68,6 +68,8 @@ class HomeTimelineChannel extends Channel {
if (this.following[note.userId]?.withReplies) {
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return;
// 自分の見ることができないユーザーの visibility: specified な投稿への返信は弾く
if (reply.visibility === 'specified' && !reply.visibleUserIds!.includes(this.user!.id)) return;
} else {
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && !isMe && reply.userId !== note.userId) return;