Skip to content

Commit

Permalink
Merge pull request #268 from alvarofe/dev
Browse files Browse the repository at this point in the history
Update version of whatsapp web
  • Loading branch information
quad authored Mar 31, 2020
2 parents fab4431 + 1f1e067 commit 66a3827
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions backend/whatsapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
from utilities import *;
from whatsapp_binary_reader import whatsappReadBinary;

WHATSAPP_WEB_VERSION="0,4,2081"

reload(sys);
sys.setdefaultencoding("utf-8");

Expand Down Expand Up @@ -233,12 +235,12 @@ def generateQRCode(self, callback=None):
self.loginInfo["clientId"] = base64.b64encode(os.urandom(16));
messageTag = str(getTimestamp());
self.messageQueue[messageTag] = { "desc": "_login", "callback": callback };
message = messageTag + ',["admin","init",[0,3,2390],["Chromium at ' + datetime.datetime.now().isoformat() + '","Chromium"],"' + self.loginInfo["clientId"] + '",true]';
message = messageTag + ',["admin","init",['+ WHATSAPP_WEB_VERSION + '],["Chromium at ' + datetime.datetime.now().isoformat() + '","Chromium"],"' + self.loginInfo["clientId"] + '",true]';
self.activeWs.send(message);

def restoreSession(self, callback=None):
messageTag = str(getTimestamp())
message = messageTag + ',["admin","init",[0,3,2390],["Chromium at ' + datetime.now().isoformat() + '","Chromium"],"' + self.loginInfo["clientId"] + '",true]'
message = messageTag + ',["admin","init",['+ WHATSAPP_WEB_VERSION + '],["Chromium at ' + datetime.now().isoformat() + '","Chromium"],"' + self.loginInfo["clientId"] + '",true]'
self.activeWs.send(message)

messageTag = str(getTimestamp())
Expand Down

0 comments on commit 66a3827

Please sign in to comment.