summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src')
-rw-r--r--protocols/WhatsApp/src/connection.cpp4
-rw-r--r--protocols/WhatsApp/src/constants.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/protocols/WhatsApp/src/connection.cpp b/protocols/WhatsApp/src/connection.cpp
index 4c5f43f826..be64ed1b41 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 += "";
+ portNumber = 443, resource += "-443";
else
- portNumber = 5222, resource += "";
+ portNumber = 5222, resource += "-5222";
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 865a06fbcc..58818f450d 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"
-// Empty resource as a workaround for not working login and to avoid encrypted messages
-#define ACCOUNT_RESOURCE ""
+// WhatsApp Samsung Galaxy S3
+#define ACCOUNT_RESOURCE "iOS-2.12.12"
#define WHATSAPP_RECV_MESSAGE 1
#define WHATSAPP_SEND_MESSAGE 2