diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-11 13:40:24 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-11 13:40:24 +0000 |
commit | e8cfaff4970726c7f15c0241e0c6b210ead2f0bd (patch) | |
tree | 6ddda89e8756ba7af349a46c9a6f689b68cfb8d9 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 16836ea77582da49b82c9b95332762f7135c76ea (diff) |
VKontakte:
fix for leave chat menuitem on clist contact’s menu
fix for mark messages as read for chat messages
git-svn-id: http://svn.miranda-ng.org/main/trunk@10764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index e9e8bb035a..5d36024b34 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -562,15 +562,16 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe ptszBody = mir_tstrdup(CMString(ptszBody) + GetAttachmentDescr(pAttachments));
MCONTACT hContact = FindUser(uid, true);
+ int chat_id = json_as_int(json_get(pMsg, "chat_id"));
+
char szMid[40];
_itoa(mid, szMid, 10);
- if (m_iMarkMessageReadOn == markOnReceive){
+ if ((m_iMarkMessageReadOn == markOnReceive) || (chat_id != 0)){
if (!mids.IsEmpty())
mids.AppendChar(',');
mids.Append(szMid);
}
- int chat_id = json_as_int(json_get(pMsg, "chat_id"));
if (chat_id != 0) {
AppendChatMessage(chat_id, pMsg, false);
continue;
@@ -598,7 +599,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe }
}
- if (m_iMarkMessageReadOn == markOnReceive)
+ if (!mids.IsEmpty())
MarkMessagesRead(mids);
}
|