mirror of
https://github.com/cheveguerra/whatsapp-web.js.git
synced 2026-04-19 03:59:16 +00:00
[FIX] Use STREAM module for getting connection state instead of removed Conn model
This commit is contained in:
@@ -41,4 +41,19 @@ exports.ChatTypes = {
|
||||
SOLO: 'solo',
|
||||
GROUP: 'group',
|
||||
UNKNOWN: 'unknown'
|
||||
}
|
||||
|
||||
exports.WAState = {
|
||||
CONFLICT: "CONFLICT",
|
||||
CONNECTED: "CONNECTED",
|
||||
DEPRECATED_VERSION: "DEPRECATED_VERSION",
|
||||
OPENING: "OPENING",
|
||||
PAIRING: "PAIRING",
|
||||
PROXYBLOCK: "PROXYBLOCK",
|
||||
SMB_TOS_BLOCK: "SMB_TOS_BLOCK",
|
||||
TIMEOUT: "TIMEOUT",
|
||||
TOS_BLOCK: "TOS_BLOCK",
|
||||
UNLAUNCHED: "UNLAUNCHED",
|
||||
UNPAIRED: "UNPAIRED",
|
||||
UNPAIRED_IDLE: "UNPAIRED_IDLE"
|
||||
}
|
||||
@@ -7,6 +7,7 @@ exports.ExposeStore = (moduleRaidStr) => {
|
||||
eval("var moduleRaid = " + moduleRaidStr);
|
||||
window.mR = moduleRaid();
|
||||
window.Store = window.mR.findModule("Chat")[1].default;
|
||||
window.Store.AppState = window.mR.findModule("STREAM")[0].default;
|
||||
|
||||
window.Store.genId = window.mR.findModule((module) => module.default && typeof module.default === 'function' && module.default.toString().match(/crypto/))[0].default;
|
||||
window.Store.SendMessage = window.mR.findModule("sendTextMsgToChat")[0].sendTextMsgToChat;
|
||||
|
||||
Reference in New Issue
Block a user