From 6b82dc2cd3d41ac2354d6c0b4633e4e659da991d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Fri, 29 Jan 2016 09:10:18 +0000 Subject: WhatsApp: Thug Life, use empty resource workaround (thanks Thug) git-svn-id: http://svn.miranda-ng.org/main/trunk@16184 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/connection.cpp | 4 ++-- protocols/WhatsApp/src/constants.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/WhatsApp') diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp index be64ed1b41..4c5f43f826 100644 --- a/protocols/WhatsApp/src/connection.cpp +++ b/protocols/WhatsApp/src/connection.cpp @@ -64,9 +64,9 @@ void WhatsAppProto::stayConnectedLoop(void*) std::string password(passBin, passLen), resource = ACCOUNT_RESOURCE; int portNumber; if (getByte(WHATSAPP_KEY_SSL, 0)) - portNumber = 443, resource += "-443"; + portNumber = 443, resource += ""; else - portNumber = 5222, resource += "-5222"; + portNumber = 5222, resource += ""; m_pSocket = new WASocketConnection("c.whatsapp.net", portNumber); m_pConnection = new WAConnection(m_szPhoneNumber, resource, &connMutex, &writerMutex, m_pSocket, this, this); diff --git a/protocols/WhatsApp/src/constants.h b/protocols/WhatsApp/src/constants.h index 58818f450d..865a06fbcc 100644 --- a/protocols/WhatsApp/src/constants.h +++ b/protocols/WhatsApp/src/constants.h @@ -30,8 +30,8 @@ #define ACCOUNT_URL_REGISTERREQUESTV2 "https://v.whatsapp.net/v2/register" #define ACCOUNT_URL_EXISTSV2 "https://v.whatsapp.net/v2/exist" -// WhatsApp Samsung Galaxy S3 -#define ACCOUNT_RESOURCE "iOS-2.12.12" +// Empty resource as a workaround for not working login and to avoid encrypted messages +#define ACCOUNT_RESOURCE "" #define WHATSAPP_RECV_MESSAGE 1 #define WHATSAPP_SEND_MESSAGE 2 -- cgit v1.2.3