|
|
@ -523,6 +523,14 @@ export default defineStore('chatStore', { |
|
|
if (msgInfo.tmpId) { |
|
|
if (msgInfo.tmpId) { |
|
|
for (let idx = chat.messages.length - 1; idx >= 0; idx--) { |
|
|
for (let idx = chat.messages.length - 1; idx >= 0; idx--) { |
|
|
let m = chat.messages[idx]; |
|
|
let m = chat.messages[idx]; |
|
|
|
|
|
// 这里只查询临时消息,跳过正常消息
|
|
|
|
|
|
if (m.id) { |
|
|
|
|
|
continue; |
|
|
|
|
|
} |
|
|
|
|
|
// 这里只查询临时消息,跳过有id的正常消息
|
|
|
|
|
|
if (m.id) { |
|
|
|
|
|
contine; |
|
|
|
|
|
} |
|
|
if (m.tmpId && msgInfo.tmpId == m.tmpId) { |
|
|
if (m.tmpId && msgInfo.tmpId == m.tmpId) { |
|
|
return m; |
|
|
return m; |
|
|
} |
|
|
} |
|
|
|