fix: update im SDK

feature/im-0611-ch
ch 2 years ago
parent 69abc97570
commit 150f61315e

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-05-18 14:54:47
* @LastEditors: ch
* @LastEditTime: 2022-06-13 21:56:37
* @LastEditTime: 2022-06-13 22:17:14
* @Description: file content
*/
import { CreateUUID, FormatDate, ToAsyncAwait } from "@/plugins/utils";
@ -33,7 +33,6 @@ const fromatPotoReq = (traceId, traceType, content) => {
message: res.getMessage(),
};
};
class MsbIm {
defaultOption = {
ioKey: 'traceId',
@ -278,21 +277,21 @@ class MsbIm {
const { content } = result;
// let newData = [];
// content.sessionVOS.forEach((item) => {
// if (item.lastMessage) {
// item.lastMessage.payload = JSON.parse(item.lastMessage.payload || {});
// }
// let historyData = this.sessionData;
// let hisIndex = historyData.findIndex((i) => i.id === item.id);
// if (hisIndex >= 0) {
// historyData[hisIndex].lastMessage = item.lastMessage;
// historyData[hisIndex].unreadCount++;
// newData.push(historyData[hisIndex]);
// } else {
// item.messageList = [];
// newData = [...newData, item];
// }
// });
content.sessionVOS.forEach((item) => {
if (item.lastMessage) {
item.lastMessage.payload = JSON.parse(item.lastMessage.payload || {});
}
// let historyData = this.sessionData;
// let hisIndex = historyData.findIndex((i) => i.id === item.id);
// if (hisIndex >= 0) {
// historyData[hisIndex].lastMessage = item.lastMessage;
// historyData[hisIndex].unreadCount++;
// newData.push(historyData[hisIndex]);
// } else {
// item.messageList = [];
// newData = [...newData, item];
// }
});
this.setSessionData(content.sessionVOS);
return Promise.resolve(result);
}

Loading…
Cancel
Save