浏览代码

修复发送消息一直卡住的bug

xsx 5 月之前
父节点
当前提交
9f385eaf6a
共有 2 个文件被更改,包括 2 次插入2 次删除
  1. 1 1
      im-uniapp/store/chatStore.js
  2. 1 1
      im-web/src/store/chatStore.js

+ 1 - 1
im-uniapp/store/chatStore.js

@@ -527,7 +527,7 @@ export default defineStore('chatStore', {
 						continue;
 					}
 					if (msgInfo.tmpId == m.tmpId) {
-						return idx;
+						return m;
 					}
 					// 如果id比要查询的消息小,说明没有这条消息
 					if (m.tmpId && m.tmpId < msgInfo.tmpId) {

+ 1 - 1
im-web/src/store/chatStore.js

@@ -555,7 +555,7 @@ export default defineStore('chatStore', {
 						continue;
 					}
 					if (msgInfo.tmpId == m.tmpId) {
-						return idx;
+						return m;
 					}
 					// 如果id比要查询的消息小,说明没有这条消息
 					if (m.tmpId && m.tmpId < msgInfo.tmpId) {