fix: window.WWebJS.getChatModel (#3587)
* fix: skip objects that don't have id * fix: check for defined contact prop
This commit is contained in:
parent
bbc089a625
commit
755cb6ce73
1 changed files with 2 additions and 2 deletions
|
|
@ -556,8 +556,8 @@ exports.LoadUtils = () => {
|
|||
const chatWid = window.Store.WidFactory.createWid(chat.id._serialized);
|
||||
await window.Store.GroupMetadata.update(chatWid);
|
||||
chat.groupMetadata.participants._models
|
||||
.filter(x => x.id._serialized.endsWith('@lid'))
|
||||
.forEach(x => { x.id = x.contact.phoneNumber; });
|
||||
.filter(x => x.id?._serialized?.endsWith('@lid'))
|
||||
.forEach(x => x.contact?.phoneNumber && (x.id = x.contact.phoneNumber));
|
||||
model.groupMetadata = chat.groupMetadata.serialize();
|
||||
model.isReadOnly = chat.groupMetadata.announce;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue