fix(stream): チャンネル接続主に見えないはずのノートが表示される問題を修正
This commit is contained in:
parent
464884c1ab
commit
1dde8653e8
9 changed files with 60 additions and 6 deletions
|
@ -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がブロックされているユーザーが関わるものだったら無視する
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue