From dd257b2039bab0bc140617c8e7891bb92869504e Mon Sep 17 00:00:00 2001 From: alechkos <93551621+alechkos@users.noreply.github.com> Date: Sat, 31 May 2025 21:24:44 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20`@=C2=ADlid`=20support=20(#3571)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: convert lid to wid in window.WWebJS.getChatModel * convert lid to wid in window.WWebJS.getContact --- src/util/Injected/Utils.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/util/Injected/Utils.js b/src/util/Injected/Utils.js index b11d38d..dfef7fd 100644 --- a/src/util/Injected/Utils.js +++ b/src/util/Injected/Utils.js @@ -467,6 +467,9 @@ exports.LoadUtils = () => { res.isGroup = true; 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; }); res.groupMetadata = chat.groupMetadata.serialize(); res.isReadOnly = chat.groupMetadata.announce; } @@ -559,7 +562,10 @@ exports.LoadUtils = () => { window.WWebJS.getContact = async contactId => { const wid = window.Store.WidFactory.createWid(contactId); - const contact = await window.Store.Contact.find(wid); + let contact = await window.Store.Contact.find(wid); + if (contact.id._serialized.endsWith('@lid')) { + contact.id = contact.phoneNumber; + } const bizProfile = await window.Store.BusinessProfile.fetchBizProfile(wid); bizProfile.profileOptions && (contact.businessProfile = bizProfile); return window.WWebJS.getContactModel(contact);