summaryrefslogtreecommitdiff
path: root/protocols/WhatsAppWeb/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-09-28 13:56:13 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-09-28 13:56:13 +0300
commit3e1bb4ac88fe352f955cd639aeb1e3f57163b180 (patch)
tree589fc168398d7a27c66d8dfab5b862b1540035ff /protocols/WhatsAppWeb/src/proto.cpp
parent49069bcc23da6ef9790c6efb2d0e5d3c92c6b7fd (diff)
WhatsApp: fix for packet decoding
Diffstat (limited to 'protocols/WhatsAppWeb/src/proto.cpp')
-rw-r--r--protocols/WhatsAppWeb/src/proto.cpp9
1 files changed, 2 insertions, 7 deletions
diff --git a/protocols/WhatsAppWeb/src/proto.cpp b/protocols/WhatsAppWeb/src/proto.cpp
index 6ca625e2e4..c21b6e24c7 100644
--- a/protocols/WhatsAppWeb/src/proto.cpp
+++ b/protocols/WhatsAppWeb/src/proto.cpp
@@ -22,11 +22,6 @@ static int CompareOwnMsgs(const WAOwnMessage *p1, const WAOwnMessage *p2)
return strcmp(p1->szPrefix, p2->szPrefix);
}
-static int CompareRequests(const WARequest *p1, const WARequest *p2)
-{
- return strcmp(p1->szPrefix, p2->szPrefix);
-}
-
static int CompareUsers(const WAUser *p1, const WAUser *p2)
{
return strcmp(p1->szId, p2->szId);
@@ -38,7 +33,7 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) :
m_tszDefaultGroup(getWStringA(DBKEY_DEF_GROUP)),
m_arUsers(10, CompareUsers),
m_arOwnMsgs(1, CompareOwnMsgs),
- m_arPacketQueue(10, CompareRequests),
+ m_arPacketQueue(10),
m_wszDefaultGroup(this, "DefaultGroup", L"WhatsApp"),
m_bHideGroupchats(this, "HideChats", true)
{
@@ -258,7 +253,7 @@ int WhatsAppProto::SendMsg(MCONTACT hContact, int, const char *pszMsg)
payLoad.addAttr("type", "relay");
payLoad.content.assign(pBuf, cbBinaryLen);
- int pktId = WSSendNode(szMsgId, 0, payLoad, &WhatsAppProto::OnSendMessage);
+ int pktId = WSSendNode(0, payLoad);
mir_cslock lck(m_csOwnMessages);
m_arOwnMsgs.insert(new WAOwnMessage(pktId, hContact, szMsgId));