|
@@ -486,7 +486,7 @@ export const useWebSocketStore = defineStore("webSocketStore", {
|
|
|
}
|
|
|
systemStore.messageList[sessionId] = [...systemStore.messageList[sessionId]].map(item => {
|
|
|
// 消息发送成功确认
|
|
|
- if (!item.id && msg.msgId && item.msgId + '' === msg.msgId + '') return {...item, id: msg.id, msgId: undefined, err: !msg.id?true:undefined};
|
|
|
+ if (!item.id && msg.msgId && item.msgId + '' === msg.msgId + '') return { ...item, file: null, localUrl: null, id: msg.id, url: msg.url || item.localUrl, msgId: undefined, err: !msg.id?true:undefined};
|
|
|
// 阅后即焚
|
|
|
// console.log(item.id, msg?.id)
|
|
|
if (item.id + '' === msg?.id + '') return {...item, isTemp: true, content: "", url: ""};
|
|
@@ -496,13 +496,13 @@ export const useWebSocketStore = defineStore("webSocketStore", {
|
|
|
if (this.toUserInfo.uuid === sessionId) {
|
|
|
this.messages = [...this.messages].map(item => {
|
|
|
// 消息发送成功确认
|
|
|
- if (!item.id && msg.msgId && item.msgId + '' === msg?.msgId + '') return { ...item, id: msg.id, msgId: undefined, err: !msg.id?true:undefined};
|
|
|
+ if (!item.id && msg.msgId && item.msgId + '' === msg?.msgId + '') return { ...item, file: null, localUrl: null, url: msg.url || item.localUrl, id: msg.id, msgId: undefined, err: !msg.id?true:undefined};
|
|
|
// 阅后即焚
|
|
|
if (item.id + '' === msg?.id + '') return { ...item, isTemp: true, content: "", url: ""};
|
|
|
return item;
|
|
|
});
|
|
|
}
|
|
|
- console.log("修改消息", message, sessionId, systemStore.messageList,this.messages);
|
|
|
+ // console.log("修改消息", message, sessionId, systemStore.messageList,this.messages);
|
|
|
},
|
|
|
// 更新本地消息
|
|
|
modifyMessage(message, msgId, sessionId = null) {
|