From f5936a6e7fde2f37e063ba23d764766517d402e5 Mon Sep 17 00:00:00 2001 From: YunaiV Date: Thu, 7 May 2026 18:01:43 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20feat(im):=20=E5=88=9D=E5=A7=8B?= =?UTF-8?q?=E5=8C=96=E7=BE=A4=E5=90=8D=E7=89=87=20v0.2=EF=BC=9A=E7=AC=AC?= =?UTF-8?q?=E4=BA=8C=E6=AC=A1=E8=AF=84=E5=AE=A1=EF=BC=88=E9=9C=80=E6=B1=82?= =?UTF-8?q?=E5=90=84=E7=A7=8D=E8=BF=9B=E7=BE=A4=E7=9A=84=E5=B0=8F=E9=97=AE?= =?UTF-8?q?=E9=A2=98=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/im/home/store/conversationStore.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/views/im/home/store/conversationStore.ts b/src/views/im/home/store/conversationStore.ts index 8781a751a..6c3ae19bd 100644 --- a/src/views/im/home/store/conversationStore.ts +++ b/src/views/im/home/store/conversationStore.ts @@ -465,7 +465,7 @@ export const useConversationStore = defineStore('imConversationStore', { ) } - // 1.1 查找或自动创建会话 + // 1.1 查找或自动创建会话;命中软删会话需要复活(场景:A 退群后被重新拉入、用户主动删了对话又收到新消息) let conversation = this.getConversation(conversationInfo.type, conversationInfo.targetId) if (!conversation) { conversation = this.createEmptyConversation( @@ -475,6 +475,10 @@ export const useConversationStore = defineStore('imConversationStore', { conversationInfo.avatar ) this.conversations.unshift(conversation) + } else if (conversation.deleted) { + conversation.deleted = false + conversation.name = conversationInfo.name || conversation.name + conversation.avatar = conversationInfo.avatar || conversation.avatar } // 1.2 去重合并:优先按 id,其次按 clientMessageId。命中则覆盖更新并返回