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 /src/services/note/create.ts | |
| parent | [Test] Disable some tests temporary (diff) | |
| download | sharkey-734277d9f690c5a1217edd91b2d4806ebd8f9f27.tar.gz sharkey-734277d9f690c5a1217edd91b2d4806ebd8f9f27.tar.bz2 sharkey-734277d9f690c5a1217edd91b2d4806ebd8f9f27.zip | |
[Server] Resolve #4062
Diffstat (limited to 'src/services/note/create.ts')
| -rw-r--r-- | src/services/note/create.ts | 10 |
1 files changed, 10 insertions, 0 deletions
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; |