Skip to content

Commit 5e30eb3

Browse files
felippeefreireFelippe Freire
and
Felippe Freire
authored
Fix error on load modules (#888)
* adapt extension to new version * fix return store * update solution to best code * format code Co-authored-by: Felippe Freire <felippe.freire@asksuite.com>
1 parent 7abcdce commit 5e30eb3

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

webwhatsapi/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ class WhatsAPIDriver(object):
7575
"firstrun": "#wrapper",
7676
"qrCode": "canvas",
7777
"qrCodePlain": "div[data-ref]",
78-
"mainPage": ".app.two",
78+
"mainPage": ".two",
7979
"chatList": ".infinite-list-viewport",
8080
"messageList": "#main > div > div:nth-child(1) > div > div.message-list",
8181
"unreadMessageBar": "#main > div > div:nth-child(1) > div > div.message-list > div.msg-unread",

webwhatsapi/consts.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
class Selectors(object):
55
FIRST_RUN = "#wrapper"
66
QR_CODE = ".qrcode > img:nth-child(4)"
7-
MAIN_PAGE = ".app.two"
7+
MAIN_PAGE = ".two"
88
CHAT_LIST = ".infinite-list-viewport"
99
MESSAGE_LIST = "#main > div > div:nth-child(1) > div > div.message-list"
1010
UNREAD_MESSAGE_BAR = (

webwhatsapi/js/wapi.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if (!window.Store) {
1111
function getStore(modules) {
1212
let foundCount = 0;
1313
let neededObjects = [
14-
{ id: "Store", conditions: (module) => (module.Chat && module.Msg) ? module : null },
14+
{ id: "Store", conditions: (module) => (module.default && module.default.Chat && module.default.Msg) ? module.default : null },
1515
{ id: "MediaCollection", conditions: (module) => (module.default && module.default.prototype && module.default.prototype.processAttachments) ? module.default : null },
1616
{ id: "MediaProcess", conditions: (module) => (module.BLOB) ? module : null },
1717
{ id: "Wap", conditions: (module) => (module.createGroup) ? module : null },

0 commit comments

Comments
 (0)