新会话调整

This commit is contained in:
dong 2023-05-23 15:02:26 +08:00
parent 642a09f80c
commit fa906225a7

View File

@ -615,9 +615,9 @@ export default {
let name = '';
if (item.type == 'PRIVATE_CHAT') {
let mId = '';
if (item.memberList[0].memberId == this.myMemberId) {
if (item.memberList[0].memberId == this.myMemberId && item.memberList[1]) {
mId = item.memberList[1].memberId;
} else if (item.memberList[1].memberId == this.myMemberId) {
} else {
mId = item.memberList[0].memberId;
}
const node = this.memberData[mId];
@ -731,12 +731,11 @@ export default {
},
getPrivateChatId(item) {
let pId = '';
if (item.type == 'PRIVATE_CHAT' && (item.memberList[0].memberId == this.myMemberId || item.memberList[1].memberId == this.myMemberId)) {
const find = item.memberList.find(ii => {
return ii.memberId != this.myMemberId;
});
if (find) {
pId = find.memberId;
if (item.type == 'PRIVATE_CHAT') {
if (item.memberList[0].memberId == this.myMemberId && item.memberList[1]) {
pId = item.memberList[1].memberId;
} else {
pId = item.memberList[0].memberId;
}
}
return pId;