公開以外へのリプライ時元の公開範囲で指定したユーザー情報を引き継ぐように (#5119)

* 公開以外へのリプライ時元の公開範囲で指定したユーザー情報を引き継ぐように

* Use users/show userIds
This commit is contained in:
Satsuki Yanagi 2019-07-07 17:14:08 +09:00 committed by syuilo
parent febb492235
commit 6480bd70bf

View file

@ -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);
});