mirror of
https://codeberg.org/yeentown/barkey.git
synced 2025-07-07 20:44:34 +00:00
copy changes to home channel
This commit is contained in:
parent
472c7b7f34
commit
6c58171c41
1 changed files with 6 additions and 11 deletions
|
@ -50,24 +50,19 @@ class HomeTimelineChannel extends Channel {
|
||||||
if (!isMe && !Object.hasOwn(this.following, note.userId)) return;
|
if (!isMe && !Object.hasOwn(this.following, note.userId)) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (note.visibility === 'followers') {
|
if (!this.isNoteVisibleToMe(note)) return;
|
||||||
if (!isMe && !Object.hasOwn(this.following, note.userId)) return;
|
|
||||||
} else if (note.visibility === 'specified') {
|
|
||||||
if (!isMe && !note.visibleUserIds!.includes(this.user!.id)) return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (note.reply) {
|
if (note.reply) {
|
||||||
const reply = note.reply;
|
const reply = note.reply;
|
||||||
if (this.following[note.userId]?.withReplies) {
|
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
|
||||||
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
|
if (!this.isNoteVisibleToMe(reply)) return;
|
||||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
|
if (!this.following[note.userId]?.withReplies) {
|
||||||
} else {
|
|
||||||
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
|
// 「チャンネル接続主への返信」でもなければ、「チャンネル接続主が行った返信」でもなければ、「投稿者の投稿者自身への返信」でもない場合
|
||||||
if (reply.userId !== this.user!.id && !isMe && reply.userId !== note.userId) return;
|
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 ((note.user.isSilenced || note.user.instance?.isSilenced) && !this.following[note.userId] && note.userId !== this.user!.id) return;
|
||||||
|
|
||||||
// 純粋なリノート(引用リノートでないリノート)の場合
|
// 純粋なリノート(引用リノートでないリノート)の場合
|
||||||
if (isRenotePacked(note) && !isQuotePacked(note) && note.renote) {
|
if (isRenotePacked(note) && !isQuotePacked(note) && note.renote) {
|
||||||
|
@ -75,7 +70,7 @@ class HomeTimelineChannel extends Channel {
|
||||||
if (note.renote.reply) {
|
if (note.renote.reply) {
|
||||||
const reply = note.renote.reply;
|
const reply = note.renote.reply;
|
||||||
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信のリノートは弾く
|
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信のリノートは弾く
|
||||||
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId) && reply.userId !== this.user!.id) return;
|
if (!this.isNoteVisibleToMe(reply)) return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue