新会话调整

This commit is contained in:
dong 2023-05-23 18:11:28 +08:00
parent 6c8ae4f763
commit 248f2a767a

View File

@ -366,20 +366,19 @@ export default {
},
sendPrivateMsg(item) {
this.privateChatId = item.id;
const mList = [
{memberId: this.myMemberId, connect: false, role: 'Leader'},
{memberId: item.id, connect: false, role: 'Leader'}
];
const findIndex = this.groupList.findIndex(ii => {
return ii.type == 'PRIVATE_CHAT' && ii.memberList.find(m => {
return m.memberId == item.id;
});
return ii.type == 'PRIVATE_CHAT' && this.isEqualMember(ii.memberList, mList);
});
let index = findIndex;
if (findIndex < 0) {
const obj = {
creatorId: this.myMemberId,
leaderId: this.myMemberId,
memberList: [
{memberId: this.myMemberId, connect: false, role: 'Leader'},
{memberId: item.id, connect: false, role: 'Leader'}
],
memberList: mList,
messageList: [],
name: item.labelName,
type: 'PRIVATE_CHAT'