From 8834935d6dbfd190b0a39ac8f30cce571f08750e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Oct 2022 13:01:28 +0300 Subject: WhatsApp: sending acks & read receipts --- protocols/WhatsApp/src/proto.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'protocols/WhatsApp/src/proto.h') 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 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 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 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 HNETLIBCONN hAvatarConn = nullptr; bool SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai); + bool bHasMessageState = false; + CMPlugin(); int Load() override; -- cgit v1.2.3