diff --git a/src/client/pages/messaging/messaging-room.vue b/src/client/pages/messaging/messaging-room.vue index e8c6257f3ff29317085d7d4fa455f00a48be402e..abff3062c9283406c3ed1fb498e897ac6658b7f9 100644 --- a/src/client/pages/messaging/messaging-room.vue +++ b/src/client/pages/messaging/messaging-room.vue @@ -221,14 +221,20 @@ export default Vue.extend({ for (const id of x) { if (this.messages.some(x => x.id == id)) { const exist = this.messages.map(x => x.id).indexOf(id); - this.messages[exist].isRead = true; + this.messages[exist] = { + ...this.messages[exist], + isRead: true, + }; } } } else if (this.group) { for (const id of x.ids) { if (this.messages.some(x => x.id == id)) { const exist = this.messages.map(x => x.id).indexOf(id); - this.messages[exist].reads.push(x.userId); + this.messages[exist] = { + ...this.messages[exist], + reads: [...this.messages[exist].reads, x.userId] + }; } } }