diff options
| author | Hazelnoot <acomputerdog@gmail.com> | 2025-06-03 18:00:06 -0400 |
|---|---|---|
| committer | Hazelnoot <acomputerdog@gmail.com> | 2025-06-03 18:00:06 -0400 |
| commit | 5236d30ec53e811234b7ce1954fded7d25c3a31f (patch) | |
| tree | bc47a0247264f8492ee61212c5c50de308bd0df6 /packages/backend/src/server/api/stream/channels | |
| parent | fix user-list channel auth (diff) | |
| download | sharkey-5236d30ec53e811234b7ce1954fded7d25c3a31f.tar.gz sharkey-5236d30ec53e811234b7ce1954fded7d25c3a31f.tar.bz2 sharkey-5236d30ec53e811234b7ce1954fded7d25c3a31f.zip | |
copy changes to list channel
Diffstat (limited to 'packages/backend/src/server/api/stream/channels')
| -rw-r--r-- | packages/backend/src/server/api/stream/channels/user-list.ts | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/packages/backend/src/server/api/stream/channels/user-list.ts b/packages/backend/src/server/api/stream/channels/user-list.ts index 932fe84c0c..3f1a5a8f8f 100644 --- a/packages/backend/src/server/api/stream/channels/user-list.ts +++ b/packages/backend/src/server/api/stream/channels/user-list.ts @@ -91,26 +91,28 @@ class UserListChannel extends Channel { if (!Object.hasOwn(this.membershipsMap, note.userId)) return; - if (note.visibility === 'followers') { - if (!isMe && !Object.hasOwn(this.following, note.userId)) return; - } else if (note.visibility === 'specified') { - if (!note.visibleUserIds!.includes(this.user!.id)) return; - } + if (this.isNoteMutedOrBlocked(note)) return; + if (!this.isNoteVisibleToMe(note)) return; if (note.reply) { const reply = note.reply; - if (this.membershipsMap[note.userId]?.withReplies) { - // 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く - if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return; - } else { + // 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く + if (!this.isNoteVisibleToMe(reply)) return; + if (!this.following[note.userId]?.withReplies) { // 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合 if (reply.userId !== this.user!.id && !isMe && reply.userId !== note.userId) return; } } - if (isRenotePacked(note) && !isQuotePacked(note) && !this.withRenotes) return; - - if (this.isNoteMutedOrBlocked(note)) return; + // 純粋なリノート(引用リノートでないリノート)の場合 + if (isRenotePacked(note) && !isQuotePacked(note) && note.renote) { + if (!this.withRenotes) return; + if (note.renote.reply) { + const reply = note.renote.reply; + // 自分のフォローしていないユーザーの visibility: followers な投稿への返信のリノートは弾く + if (!this.isNoteVisibleToMe(reply)) return; + } + } const clonedNote = await this.assignMyReaction(note); await this.hideNote(clonedNote); |