summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/proto.h
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-10-23 13:01:28 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-10-23 13:01:28 +0300
commit8834935d6dbfd190b0a39ac8f30cce571f08750e (patch)
treed04ee1d79df3b535aa5b502b18933cd77c0ff467 /protocols/WhatsApp/src/proto.h
parentee4c113c7ce309a92b39e2d8f9fcb8c73877aa65 (diff)
WhatsApp: sending acks & read receipts
Diffstat (limited to 'protocols/WhatsApp/src/proto.h')
-rw-r--r--protocols/WhatsApp/src/proto.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h
index a5b6a60f57..35200ad61e 100644
--- a/protocols/WhatsApp/src/proto.h
+++ b/protocols/WhatsApp/src/proto.h
@@ -305,6 +305,8 @@ class WhatsAppProto : public PROTO<WhatsAppProto>
CMStringA GenerateMessageId();
void ProcessMessage(WAMSG type, const proto::WebMessageInfo &msg);
+ void ProcessReceipt(MCONTACT hContact, const char *msgId, bool bRead);
+
bool WSReadPacket(const WSHeader &hdr, MBinBuffer &buf);
int WSSend(const MessageLite &msg);
int WSSendNode(WANode &node, WA_PKT_HANDLER = nullptr);
@@ -317,6 +319,7 @@ class WhatsAppProto : public PROTO<WhatsAppProto>
void ServerThreadWorker(void);
void ShutdownSession(void);
+ void SendAck(const WANode &node);
void SendReceipt(const char *pszTo, const char *pszParticipant, const char *pszId, const char *pszType);
void SendKeepAlive();
void SetServerStatus(int iStatus);
@@ -350,6 +353,7 @@ class WhatsAppProto : public PROTO<WhatsAppProto>
void OnNotifyEncrypt(const WANode &node);
void OnReceiveInfo(const WANode &node);
void OnReceiveMessage(const WANode &node);
+ void OnReceiveReceipt(const WANode &node);
void OnServerSync(const WANode &node);
void OnStreamError(const WANode &node);
void OnSuccess(const WANode &node);
@@ -426,6 +430,8 @@ struct CMPlugin : public ACCPROTOPLUGIN<WhatsAppProto>
HNETLIBCONN hAvatarConn = nullptr;
bool SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai);
+ bool bHasMessageState = false;
+
CMPlugin();
int Load() override;