mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-17 19:26:20 +00:00
Fix WA 2.2146.9 (#990)
* Fix WA 2.2146.9
WA is serving two versions to me, so we need to check window.mR.findModule('Conn').lengh for a while
* to singleQuotes
* Update Injected.js
* simplify getting `Conn` module, use different object for `Store`
Co-authored-by: Pedro Lopez <pedroslopez@me.com>
This commit is contained in:
@@ -5,15 +5,15 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
eval('var moduleRaid = ' + moduleRaidStr);
|
||||
// eslint-disable-next-line no-undef
|
||||
window.mR = moduleRaid();
|
||||
window.Store = window.mR.findModule('Chat')[0].default;
|
||||
window.Store.AppState = window.mR.findModule('STREAM')[0].default;
|
||||
window.Store.Conn = window.mR.findModule('Conn')[0].default;
|
||||
window.Store = Object.assign({}, window.mR.findModule('Chat')[0].default);
|
||||
window.Store.AppState = window.mR.findModule('STREAM')[0].Socket;
|
||||
window.Store.Conn = window.mR.findModule('Conn')[0].Conn;
|
||||
window.Store.CryptoLib = window.mR.findModule('decryptE2EMedia')[0];
|
||||
window.Store.Wap = window.mR.findModule('Wap')[0].default;
|
||||
window.Store.SendSeen = window.mR.findModule('sendSeen')[0];
|
||||
window.Store.SendClear = window.mR.findModule('sendClear')[0];
|
||||
window.Store.SendDelete = window.mR.findModule('sendDelete')[0];
|
||||
window.Store.genId = window.mR.findModule('randomId')[0].default;
|
||||
window.Store.genId = window.mR.findModule('randomId')[0].randomId;
|
||||
window.Store.SendMessage = window.mR.findModule('addAndSendMsgToChat')[0];
|
||||
window.Store.MsgKey = window.mR.findModule((module) => module.default && module.default.fromString)[0].default;
|
||||
window.Store.Invite = window.mR.findModule('sendJoinGroupViaInvite')[0];
|
||||
@@ -36,8 +36,8 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
window.Store.Features = window.mR.findModule('FEATURE_CHANGE_EVENT')[0].default;
|
||||
window.Store.QueryOrder = window.mR.findModule('queryOrder')[0];
|
||||
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.DownloadManager = window.mR.findModule('downloadManager')[0].downloadManager;
|
||||
window.Store.Call = window.mR.findModule('CallCollection')[0].CallCollection;
|
||||
|
||||
if(!window.Store.Chat._find) {
|
||||
window.Store.Chat._find = e => {
|
||||
|
||||
Reference in New Issue
Block a user