1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-01 08:18:14 +09:00

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

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

* Use users/show userIds
This commit is contained in:
Satsuki Yanagi 2019-07-07 17:14:08 +09:00 committed by syuilo
parent 8b05816860
commit 4628f507e5

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