diff options
author | George Hazan <ghazan@miranda.im> | 2022-10-25 22:17:43 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-10-25 22:17:43 +0300 |
commit | b7959c62b1c479277a211504733aed14b6b914ff (patch) | |
tree | 53a5965280b758a85de7048f9d5f283c07b8ee0b /protocols/WhatsApp/src/message.cpp | |
parent | 520940ad3ea6b0d020c9a6a9356d2bb9ebaf31a2 (diff) |
getting rid of C-style shit
Diffstat (limited to 'protocols/WhatsApp/src/message.cpp')
-rw-r--r-- | protocols/WhatsApp/src/message.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/WhatsApp/src/message.cpp b/protocols/WhatsApp/src/message.cpp index 03275b446d..0d7a849c68 100644 --- a/protocols/WhatsApp/src/message.cpp +++ b/protocols/WhatsApp/src/message.cpp @@ -92,14 +92,14 @@ void WhatsAppProto::OnReceiveMessage(const WANode &node) if (!bFromMe && participant) bFromMe = m_szJid == participant; - Wa__MessageKey key = WA__MESSAGE_KEY__INIT; + Wa__MessageKey key; key.remotejid = szChatId.GetBuffer(); key.id = (char*)msgId; key.fromme = bFromMe; key.has_fromme = true; if (participant) key.participant = (char*)participant; - Wa__WebMessageInfo msg = WA__WEB_MESSAGE_INFO__INIT; + Wa__WebMessageInfo msg; msg.key = &key; msg.messagetimestamp = _atoi64(node.getAttr("t")); msg.has_messagetimestamp = true; msg.pushname = (char*)node.getAttr("notify"); @@ -320,14 +320,14 @@ int WhatsAppProto::SendTextMessage(const char *jid, const char *pszMsg) bin2hex(msgId, sizeof(msgId), szMsgId); strupr(szMsgId); - Wa__Message body = WA__MESSAGE__INIT; + Wa__Message body; body.conversation = (char*)pszMsg; - Wa__Message__DeviceSentMessage sentBody = WA__MESSAGE__DEVICE_SENT_MESSAGE__INIT; + Wa__Message__DeviceSentMessage sentBody; sentBody.message = &body; sentBody.destinationjid = (char*)jid; - Wa__Message msg = WA__MESSAGE__INIT; + Wa__Message msg; msg.devicesentmessage = &sentBody; MBinBuffer encMsg(proto::Serialize(&msg)); |