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="群主未设置">
- 邀请 + 邀请 保存 退出 解散