1
0
mirror of https://github.com/MisskeyIO/misskey synced 2024-11-27 22:38:30 +09:00
This commit is contained in:
syuilo 2020-02-16 21:11:27 +09:00
parent 02ac30c0d0
commit 40d4dc0474

View File

@ -112,17 +112,17 @@ export default async (user: User, data: Option, silent = false) => new Promise<N
if (data.localOnly == null) data.localOnly = false;
// サイレンス
if (user.isSilenced && data.visibility == 'public') {
if (user.isSilenced && data.visibility === 'public') {
data.visibility = 'home';
}
// Renote対象が「ホームまたは全体」以外の公開範囲ならreject
if (data.renote && data.renote.visibility != 'public' && data.renote.visibility != 'home' && data.renote.userId !== user.id) {
if (data.renote && data.renote.visibility !== 'public' && data.renote.visibility !== 'home' && data.renote.userId !== user.id) {
return rej('Renote target is not public or home');
}
// Renote対象がpublicではないならhomeにする
if (data.renote && data.renote.visibility != 'public' && data.visibility == 'public') {
if (data.renote && data.renote.visibility !== 'public' && data.visibility === 'public') {
data.visibility = 'home';
}
@ -132,7 +132,7 @@ export default async (user: User, data: Option, silent = false) => new Promise<N
}
// 返信対象がpublicではないならhomeにする
if (data.reply && data.reply.visibility != 'public' && data.visibility == 'public') {
if (data.reply && data.reply.visibility !== 'public' && data.visibility === 'public') {
data.visibility = 'home';
}