Introduce silence (#4043)

* Introduce silence

* Fix icon
This commit is contained in:
syuilo 2019-01-30 17:25:56 +09:00 committed by GitHub
parent b3fc4dc00f
commit 00b134ce1e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 154 additions and 3 deletions

View file

@ -116,6 +116,11 @@ export default async (user: IUser, data: Option, silent = false) => new Promise<
if (data.viaMobile == null) data.viaMobile = false;
if (data.localOnly == null) data.localOnly = false;
// サイレンス
if (user.isSilenced && data.visibility == 'public') {
data.visibility = 'home';
}
if (data.visibleUsers) {
data.visibleUsers = erase(null, data.visibleUsers);
}