summaryrefslogtreecommitdiff
path: root/src/client/app/common/scripts/post-form.ts
diff options
context:
space:
mode:
authorSatsuki Yanagi <17376330+u1-liquid@users.noreply.github.com>2019-07-07 17:14:08 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2019-07-07 17:14:08 +0900
commit4628f507e5209b560813578e86ebdc1ca747eda3 (patch)
treeb09fe2fc6b4e3911acae6f0b70dd49604ba3e0ba /src/client/app/common/scripts/post-form.ts
parentRefactor: Remove needless return (diff)
downloadsharkey-4628f507e5209b560813578e86ebdc1ca747eda3.tar.gz
sharkey-4628f507e5209b560813578e86ebdc1ca747eda3.tar.bz2
sharkey-4628f507e5209b560813578e86ebdc1ca747eda3.zip
公開以外へのリプライ時元の公開範囲で指定したユーザー情報を引き継ぐように (#5119)
* 公開以外へのリプライ時元の公開範囲で指定したユーザー情報を引き継ぐように * Use users/show userIds
Diffstat (limited to 'src/client/app/common/scripts/post-form.ts')
-rw-r--r--src/client/app/common/scripts/post-form.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/app/common/scripts/post-form.ts b/src/client/app/common/scripts/post-form.ts
index 85a578484f..7cd2e7c310 100644
--- a/src/client/app/common/scripts/post-form.ts
+++ b/src/client/app/common/scripts/post-form.ts
@@ -151,9 +151,16 @@ export default (opts) => ({
// 公開以外へのリプライ時は元の公開範囲を引き継ぐ
if (this.reply && ['home', 'followers', 'specified'].includes(this.reply.visibility)) {
this.visibility = this.reply.visibility;
+ if (this.reply.visibility === 'specified') {
+ this.$root.api('users/show', {
+ userIds: this.reply.visibleUserIds.filter(uid => uid !== this.$store.state.i.id && uid !== this.reply.userId)
+ }).then(users => {
+ this.visibleUsers.push(...users);
+ });
+ }
}
- if (this.reply) {
+ if (this.reply && this.reply.userId !== this.$store.state.i.id) {
this.$root.api('users/show', { userId: this.reply.userId }).then(user => {
this.visibleUsers.push(user);
});