diff --git a/src/client/app/desktop/views/components/post-form.vue b/src/client/app/desktop/views/components/post-form.vue index 8db85aeaca..7bf76e4829 100644 --- a/src/client/app/desktop/views/components/post-form.vue +++ b/src/client/app/desktop/views/components/post-form.vue @@ -178,6 +178,18 @@ export default Vue.extend({ }); } + // 公開以外へのリプライ時は元の公開範囲を引き継ぐ + if (this.reply && ['home', 'followers', 'specified', 'private'].includes(this.reply.visibility)) { + this.visibility = this.reply.visibility; + } + + // ダイレクトへのリプライはリプライ先ユーザーを初期設定 + if (this.reply && this.reply.visibility === 'specified') { + (this as any).api('users/show', { userId: this.reply.userId }).then(user => { + this.visibleUsers.push(user); + }); + } + this.$nextTick(() => { // 書きかけの投稿を復元 if (!this.instant) { diff --git a/src/client/app/mobile/views/components/post-form.vue b/src/client/app/mobile/views/components/post-form.vue index 1294273a2a..72ec142572 100644 --- a/src/client/app/mobile/views/components/post-form.vue +++ b/src/client/app/mobile/views/components/post-form.vue @@ -173,6 +173,18 @@ export default Vue.extend({ }); } + // 公開以外へのリプライ時は元の公開範囲を引き継ぐ + if (this.reply && ['home', 'followers', 'specified', 'private'].includes(this.reply.visibility)) { + this.visibility = this.reply.visibility; + } + + // ダイレクトへのリプライはリプライ先ユーザーを初期設定 + if (this.reply && this.reply.visibility === 'specified') { + (this as any).api('users/show', { userId: this.reply.userId }).then(user => { + this.visibleUsers.push(user); + }); + } + this.focus(); this.$nextTick(() => {