From 734277d9f690c5a1217edd91b2d4806ebd8f9f27 Mon Sep 17 00:00:00 2001 From: syuilo Date: Thu, 31 Jan 2019 17:37:57 +0900 Subject: [PATCH] [Server] Resolve #4062 --- CHANGELOG.md | 4 ++++ src/services/note/create.ts | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c88c3baa5d..ef90ac363a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ ChangeLog ========= +unreleased +---------- +* public の Renote/Reply/Quote先 が public以外 だったら、public => homeに + 10.80.0 ---------- * サイレンス機能の追加 diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 622f334c0a..a52985b2f4 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -140,6 +140,16 @@ export default async (user: IUser, data: Option, silent = false) => new Promise< return rej('Renote target is not public or home'); } + // Renote対象がpublicではないならhomeにする + if (data.renote && data.renote.visibility != 'public' && data.visibility == 'public') { + data.visibility = 'home'; + } + + // 返信対象がpublicではないならhomeにする + if (data.reply && data.reply.visibility != 'public' && data.visibility == 'public') { + data.visibility = 'home'; + } + // ローカルのみをRenoteしたらローカルのみにする if (data.renote && data.renote.localOnly) { data.localOnly = true;