diff options
author | ElzorFox <elzorfox@ya.ru> | 2018-09-21 19:59:25 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2018-09-21 19:59:41 +0500 |
commit | 43e946796770d3ec6ebecb05e758a806633030d9 (patch) | |
tree | 0e37f0e9bb17e92b31969499cc4ba49e29edfbc8 | |
parent | 6071fb87a02cd13fd68671086194a5757204f70d (diff) |
VKontakte: add id for incoming messages
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 7 |
1 files 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;
|