From e527fe74fde269fd3123b08f9a3823351df3da60 Mon Sep 17 00:00:00 2001 From: Pedro Lopez Date: Wed, 1 Sep 2021 09:16:12 -0400 Subject: [PATCH] fix: patch find function to get chats --- src/util/Injected.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/Injected.js b/src/util/Injected.js index 4087538..7697078 100644 --- a/src/util/Injected.js +++ b/src/util/Injected.js @@ -37,6 +37,13 @@ exports.ExposeStore = (moduleRaidStr) => { window.Store.QueryProduct = window.mR.findModule('queryProduct')[0]; window.Store.DownloadManager = window.mR.findModule('DownloadManager')[0].default; window.Store.Call = window.mR.findModule('CallCollection')[0].default; + + window.Store.Chat._find = e => { + const target = window.Store.Chat.get(e); + return target ? Promise.resolve(target) : Promise.resolve({ + id: e + }); + }; }; exports.LoadUtils = () => {