summaryrefslogtreecommitdiff
path: root/packages/backend/src/server
diff options
context:
space:
mode:
authorHazelnoot <acomputerdog@gmail.com>2025-06-03 17:43:18 -0400
committerHazelnoot <acomputerdog@gmail.com>2025-06-03 17:43:18 -0400
commit44843966600d3ac6ef6a5b87118e649ca52de6cd (patch)
tree3338060c76df74f39c0f6c7376edacc82c8760fc /packages/backend/src/server
parentcopy changes to local channel (diff)
downloadsharkey-44843966600d3ac6ef6a5b87118e649ca52de6cd.tar.gz
sharkey-44843966600d3ac6ef6a5b87118e649ca52de6cd.tar.bz2
sharkey-44843966600d3ac6ef6a5b87118e649ca52de6cd.zip
copy changes to hybrid channel
Diffstat (limited to 'packages/backend/src/server')
-rw-r--r--packages/backend/src/server/api/stream/channels/hybrid-timeline.ts18
1 files changed, 5 insertions, 13 deletions
diff --git a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
index 6cb425ff81..d923167e04 100644
--- a/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
+++ b/packages/backend/src/server/api/stream/channels/hybrid-timeline.ts
@@ -67,34 +67,26 @@ class HybridTimelineChannel extends Channel {
(note.channelId != null && this.followingChannels.has(note.channelId))
)) return;
- if (note.visibility === 'followers') {
- if (!isMe && !Object.hasOwn(this.following, note.userId)) return;
- } else if (note.visibility === 'specified') {
- if (!isMe && !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.following[note.userId]?.withReplies ?? false) || this.withReplies) {
- // 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
- if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
- } else {
+ // 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
+ if (!this.isNoteVisibleToMe(reply)) return;
+ if (!this.following[note.userId]?.withReplies && !this.withReplies) {
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
if (reply.userId !== this.user!.id && !isMe && reply.userId !== note.userId) return;
}
}
- if (note.user.isSilenced && !this.following[note.userId] && note.userId !== this.user!.id) return;
-
// 純粋なリノート(引用リノートでないリノート)の場合
if (isRenotePacked(note) && !isQuotePacked(note) && note.renote) {
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) && reply.userId !== this.user!.id) return;
+ if (!this.isNoteVisibleToMe(reply)) return;
}
}