feat(streaming): no blocking user on my timeline

This commit is contained in:
무라쿠모 2024-08-26 17:12:02 +09:00
parent 77ed6bb32b
commit 30c3154737
No known key found for this signature in database
GPG key ID: 139D6573F92DA9F7
9 changed files with 61 additions and 1 deletions

View file

@ -55,9 +55,14 @@ class LocalTimelineChannel extends Channel {
if (this.withFiles && (note.fileIds == null || note.fileIds.length === 0)) return;
if (this.withFiles && (note.files === undefined || note.files.length === 0)) return;
if (note.renote) {
if (this.isNoteMutedOrBlocked(note.renote)) return;
}
// 関係ない返信は除外
if (note.reply) {
const reply = note.reply;
if (this.isNoteMutedOrBlocked(reply)) return;
if ((this.following[note.userId]?.withReplies ?? false) || this.withReplies) {
// 自分のフォローしていないユーザーの visibility: followers な投稿への返信は弾く
if (reply.visibility === 'followers' && !Object.hasOwn(this.following, reply.userId)) return;