summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
Diffstat (limited to 'protocols')
-rw-r--r--protocols/WhatsApp/src/message.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/WhatsApp/src/message.cpp b/protocols/WhatsApp/src/message.cpp
index eb221e9700..41b5cf92a6 100644
--- a/protocols/WhatsApp/src/message.cpp
+++ b/protocols/WhatsApp/src/message.cpp
@@ -21,14 +21,14 @@ void WhatsAppProto::OnReceiveMessage(const WANode &node)
return;
}
+ SendAck(node);
+
MEVENT hEvent = db_event_getById(m_szModuleName, msgId);
if (hEvent) {
debugLogA("this message is already processed: %s", msgId);
return;
}
- SendAck(node);
-
WAMSG type;
WAJid jid(msgFrom);
CMStringA szAuthor, szChatId;
@@ -367,8 +367,11 @@ int WhatsAppProto::SendTextMessage(const char *jid, const char *pszMsg)
auto *pTask = new WASendTask(jid);
// basic message
+ Wa__Message__ExtendedTextMessage extMessage;
+ extMessage.text = (char *)pszMsg;
+
Wa__Message body;
- body.conversation = (char*)pszMsg;
+ body.extendedtextmessage = &extMessage;
if (toJid.isGroup()) {
MBinBuffer encodedMsg(proto::Serialize(&body));