diff options
Diffstat (limited to 'protocols/VKontakte/src/vk_messages.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 62d6168b67..4e45bf7c3b 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -335,15 +335,14 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe recv.timestamp = bEdited ? datetime : (m_vkOptions.bUseLocalTime ? time(0) : datetime);
recv.szMessage = pszBody;
recv.lParam = isOut;
- recv.pCustomData = szMid;
- recv.cbCustomDataSize = (int)mir_strlen(szMid);
Sleep(100);
debugLogA("CVkProto::OnReceiveMessages mid = %d, datetime = %d, isOut = %d, isRead = %d, uid = %d", mid, datetime, isOut, isRead, uid);
+ MEVENT hDbEvent = 0;
if (!CheckMid(m_sendIds, mid)) {
debugLogA("CVkProto::OnReceiveMessages ProtoChainRecvMsg");
- ProtoChainRecvMsg(hContact, &recv);
+ hDbEvent = ProtoChainRecvMsg(hContact, &recv);
if (mid > getDword(hContact, "lastmsgid", -1))
setDword(hContact, "lastmsgid", mid);
if (!isOut)
@@ -353,8 +352,10 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe T2Utf pszAttach(wszAttachmentDescr);
recv.timestamp = time(0); // only local time
recv.szMessage = pszAttach;
- ProtoChainRecvMsg(hContact, &recv);
+ hDbEvent = ProtoChainRecvMsg(hContact, &recv);
}
+ if (hDbEvent)
+ db_event_setId(m_szModuleName, hDbEvent, szMid);
}
if (!mids.IsEmpty())
|