summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/proto.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-10-26 12:42:50 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-10-26 12:42:50 +0300
commit976a3f93925a28feb107ae505834ce7a728a42b8 (patch)
tree71f02b66d9ac2498ae137f8966aa3c82ced1e525 /protocols/WhatsApp/src/proto.cpp
parentb7959c62b1c479277a211504733aed14b6b914ff (diff)
WhatsApp: message sending
Diffstat (limited to 'protocols/WhatsApp/src/proto.cpp')
-rw-r--r--protocols/WhatsApp/src/proto.cpp29
1 files changed, 1 insertions, 28 deletions
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp
index 863d12df1b..96e379ed73 100644
--- a/protocols/WhatsApp/src/proto.cpp
+++ b/protocols/WhatsApp/src/proto.cpp
@@ -19,7 +19,7 @@ struct SearchParam
static int CompareOwnMsgs(const WAOwnMessage *p1, const WAOwnMessage *p2)
{
- return strcmp(p1->szPrefix, p2->szPrefix);
+ return strcmp(p1->szMessageId, p2->szMessageId);
}
static int CompareUsers(const WAUser *p1, const WAUser *p2)
@@ -203,33 +203,6 @@ int WhatsAppProto::SetStatus(int new_status)
/////////////////////////////////////////////////////////////////////////////////////////
-/*
-void WhatsAppProto::OnSendMessage(const JSONNode &node, void*)
-{
- CMStringA szPrefix= node["$id$"].as_mstring();
-
- WAOwnMessage tmp(0, 0, szPrefix);
- {
- mir_cslock lck(m_csOwnMessages);
- auto *pOwn = m_arOwnMsgs.find(&tmp);
- if (pOwn == nullptr)
- return;
-
- tmp.pktId = pOwn->pktId;
- tmp.hContact = pOwn->hContact;
- m_arOwnMsgs.remove(pOwn);
- }
-
- int status = node["status"].as_int();
- if (status == 200)
- ProtoBroadcastAck(tmp.hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)tmp.pktId);
- else {
- CMStringW wszError(FORMAT, TranslateT("Operation failed with server error status %d"), status);
- ProtoBroadcastAck(tmp.hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)tmp.pktId, LPARAM(wszError.c_str()));
- }
-}
-*/
-
int WhatsAppProto::SendMsg(MCONTACT hContact, int, const char *pszMsg)
{
ptrA jid(getStringA(hContact, DBKEY_ID));