From 43e946796770d3ec6ebecb05e758a806633030d9 Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Fri, 21 Sep 2018 19:59:25 +0500 Subject: VKontakte: add id for incoming messages --- protocols/VKontakte/src/vk_messages.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 7142de4056..6e9772bb4d 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -100,12 +100,12 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) CVkSendMsgParam *param = (CVkSendMsgParam *)pReq->pUserInfo; debugLogA("CVkProto::OnSendMessage %d", reply->resultCode); + UINT mid = 0; if (reply->resultCode == 200) { JSONNode jnRoot; const JSONNode &jnResponse = CheckJsonResponse(pReq, reply, jnRoot); if (jnResponse) { debugLogA("CVkProto::OnSendMessage jnResponse %d", jnResponse.as_int()); - UINT mid; switch (jnResponse.type()) { case JSON_NUMBER: mid = jnResponse.as_int(); @@ -134,13 +134,16 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) } } + char szMid[40]; + _itoa(mid, szMid, 10); + if (param->pFUP) { ProtoBroadcastAck(param->hContact, ACKTYPE_FILE, iResult, (HANDLE)(param->pFUP)); if (!pReq->bNeedsRestart || m_bTerminated) delete param->pFUP; } else if (m_vkOptions.bServerDelivery) - ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, iResult, (HANDLE)(param->iMsgID)); + ProtoBroadcastAck(param->hContact, ACKTYPE_MESSAGE, iResult, (HANDLE)(param->iMsgID), (LPARAM)szMid); if (!pReq->bNeedsRestart || m_bTerminated) { delete param; -- cgit v1.2.3