This commit is contained in:
syuilo 2020-02-16 21:11:27 +09:00
parent 02ac30c0d0
commit 40d4dc0474
1 changed files with 4 additions and 4 deletions

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