From 82f5234c9422c85701b60b0f81046223809bdc84 Mon Sep 17 00:00:00 2001 From: xsx <825657193@qq.com> Date: Wed, 30 Apr 2025 17:39:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=A0=E9=99=A4=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- im-web/src/components/chat/ChatBox.vue | 12 +++++++----- im-web/src/view/Group.vue | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/im-web/src/components/chat/ChatBox.vue b/im-web/src/components/chat/ChatBox.vue index dd3ea6f..f7195a4 100644 --- a/im-web/src/components/chat/ChatBox.vue +++ b/im-web/src/components/chat/ChatBox.vue @@ -480,7 +480,7 @@ export default { cancelButtonText: '取消', type: 'warning' }).then(() => { - this.$store.commit("deleteMessage", msgInfo); + this.$store.commit("deleteMessage", [msgInfo, this.chat]); }); }, recallMessage(msgInfo) { @@ -567,13 +567,15 @@ export default { }) }, showName(msgInfo) { - if (this.chat.type == 'GROUP') { + if (!msgInfo) { + return "" + } + if (this.isGroup) { let member = this.groupMembers.find((m) => m.userId == msgInfo.sendId); - return member ? member.showNickName : ""; + return member ? member.showNickName : msgInfo.sendNickName || ""; } else { - return msgInfo.sendId == this.mine.id ? this.mine.nickName : this.chat.showName + return msgInfo.selfSend ? this.mine.nickName : this.chat.showName } - }, headImage(msgInfo) { if (this.chat.type == 'GROUP') { diff --git a/im-web/src/view/Group.vue b/im-web/src/view/Group.vue index b25ff5e..a08da74 100644 --- a/im-web/src/view/Group.vue +++ b/im-web/src/view/Group.vue @@ -61,7 +61,7 @@ maxlength="1024" placeholder="群主未设置">
- 邀请 + 邀请 保存 退出 解散