diff options
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index b96d55ea2e..ae4d84fb9f 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -686,22 +686,19 @@ void CVkProto::OnReceiveDlgs(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) int uid = json_as_int(json_get(pDlg, "user_id"));
MCONTACT hContact = FindUser(uid, true);
- if (getDword(hContact, "lastmsgid", -1) == -1 && numUnread){
- setDword(hContact, "new_lastmsgid", mid);
- GetHistoryDlgMessages(hContact, 0, numUnread, -1);
- }
+ if (getDword(hContact, "lastmsgid", -1) == -1 && numUnread)
+ GetServerHistory(hContact, 0, numUnread, 0, 0, true);
else
GetHistoryDlg(hContact, mid);
- if (m_iMarkMessageReadOn == markOnReceive&&numUnread)
+ if (m_iMarkMessageReadOn == markOnReceive && numUnread)
MarkMessagesRead(hContact);
}
else if (numUnread) {
int mid = json_as_int(json_get(pDlg, "id"));
int uid = json_as_int(json_get(pDlg, "user_id"));
MCONTACT hContact = FindUser(uid, true);
- setDword(hContact, "new_lastmsgid", mid);
- GetHistoryDlgMessages(hContact, 0, numUnread, -1);
+ GetServerHistory(hContact, 0, numUnread, 0, 0, true);
if (m_iMarkMessageReadOn == markOnReceive)
MarkMessagesRead(hContact);
|