diff options
| author | MeiMei <30769358+mei23@users.noreply.github.com> | 2018-09-26 20:39:59 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2018-09-26 20:39:59 +0900 |
| commit | 77b441f14c9823cf8caac7eb5f0146435fea06b3 (patch) | |
| tree | 76bfb84dfa35bb93ebac9c17c6b70f4b806fdb30 /src | |
| parent | 8.62.0 (diff) | |
| download | misskey-77b441f14c9823cf8caac7eb5f0146435fea06b3.tar.gz misskey-77b441f14c9823cf8caac7eb5f0146435fea06b3.tar.bz2 misskey-77b441f14c9823cf8caac7eb5f0146435fea06b3.zip | |
リプライで元の公開範囲を引き継ぐ (#2775)
* ホーム/フォロワー限定へのリプライは公開範囲を引き継ぐように
* ダイレクトへのリプライはダイレクトでリプライ先ユーザーを初期設定するように
* 非公開へのリプライでも元の公開範囲を引き継ぐ
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/app/desktop/views/components/post-form.vue | 12 | ||||
| -rw-r--r-- | src/client/app/mobile/views/components/post-form.vue | 12 |
2 files changed, 24 insertions, 0 deletions
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(() => { |