fix(stream): チャンネル接続主に見えないはずのノートが表示される問題を修正
This commit is contained in:
@@ -40,6 +40,14 @@ class AntennaChannel extends Channel {
|
||||
if (data.type === 'note') {
|
||||
const note = await this.noteEntityService.pack(data.body.id, this.user, { detail: true });
|
||||
|
||||
if (note.reply) {
|
||||
const reply = note.reply;
|
||||
// 自分のフォローしていないユーザーの 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;
|
||||
}
|
||||
|
||||
// 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する
|
||||
if (isUserRelated(note, this.userIdsWhoMeMuting)) return;
|
||||
// 流れてきたNoteがブロックされているユーザーが関わるものだったら無視する
|
||||
|
Reference in New Issue
Block a user