Filter hidden replies / mentions (#3981)

* Fix: 非公開投稿が返信一覧に出てくる

* Fix: 非公開投稿がメンション一覧に出てくる

* 非公開投稿は通知/メンション通知しない

* repliesにフォロワー限定がかからなかったのを修正

* Fix: ホームにフォロワー限定投稿が表示されない

* 認証必須エンドポイントで user == null にはならない

* mentionsにフォロワー限定がかからなかったのを修正
This commit is contained in:
MeiMei
2019-01-25 00:06:20 +09:00
committed by syuilo
parent d731c7da13
commit 5eca0a31f7
4 changed files with 56 additions and 8 deletions

View File

@ -19,6 +19,11 @@ export default class extends Channel {
switch (type) {
case 'notification': {
if (mutedUserIds.includes(body.userId)) return;
if (body.note && body.note.isHidden) return;
break;
}
case 'mention': {
if (body.isHidden) return;
break;
}
}