diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-01-31 17:37:57 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-01-31 17:37:57 +0900 |
| commit | 734277d9f690c5a1217edd91b2d4806ebd8f9f27 (patch) | |
| tree | ebca475c3118d9d1ebd6ab9b54b0bd0a99eb62fe | |
| parent | [Test] Disable some tests temporary (diff) | |
| download | misskey-734277d9f690c5a1217edd91b2d4806ebd8f9f27.tar.gz misskey-734277d9f690c5a1217edd91b2d4806ebd8f9f27.tar.bz2 misskey-734277d9f690c5a1217edd91b2d4806ebd8f9f27.zip | |
[Server] Resolve #4062
| -rw-r--r-- | CHANGELOG.md | 4 | ||||
| -rw-r--r-- | src/services/note/create.ts | 10 |
2 files changed, 14 insertions, 0 deletions
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; |