From 207a5ad104c8a4dcfae102f98ebb3b1736a1861d Mon Sep 17 00:00:00 2001 From: BenyFilho <168232825+BenyFilho@users.noreply.github.com> Date: Fri, 30 Jan 2026 05:50:19 -0300 Subject: [PATCH] Fix getChats (#5779) * Fix: getChats -> getChatModel -> GroupMetadata and NewsletterMetadata * Fix module change --- src/util/Injected/Utils.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/util/Injected/Utils.js b/src/util/Injected/Utils.js index 920dbe8..13881da 100644 --- a/src/util/Injected/Utils.js +++ b/src/util/Injected/Utils.js @@ -645,7 +645,8 @@ exports.LoadUtils = () => { if (chat.groupMetadata) { model.isGroup = true; const chatWid = window.Store.WidFactory.createWid(chat.id._serialized); - await window.Store.GroupMetadata.update(chatWid); + const groupMetadata = window.Store.GroupMetadata || window.Store.WAWebGroupMetadataCollection; + await groupMetadata.update(chatWid); chat.groupMetadata.participants._models .filter(x => x.id?._serialized?.endsWith('@lid')) .forEach(x => x.contact?.phoneNumber && (x.id = x.contact.phoneNumber)); @@ -654,7 +655,8 @@ exports.LoadUtils = () => { } if (chat.newsletterMetadata) { - await window.Store.NewsletterMetadataCollection.update(chat.id); + const newsletterMetadata = window.Store.NewsletterMetadataCollection || window.Store.WAWebNewsletterMetadataCollection; + await newsletterMetadata.update(chat.id); model.channelMetadata = chat.newsletterMetadata.serialize(); model.channelMetadata.createdAtTs = chat.newsletterMetadata.creationTime; }