From e8cfaff4970726c7f15c0241e0c6b210ead2f0bd Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Sat, 11 Oct 2014 13:40:24 +0000 Subject: =?UTF-8?q?VKontakte:=20fix=20for=20leave=20chat=20menuitem=20on?= =?UTF-8?q?=20clist=20contact=E2=80=99s=20menu=20fix=20for=20mark=20messag?= =?UTF-8?q?es=20as=20read=20for=20chat=20messages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.miranda-ng.org/main/trunk@10764 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'protocols/VKontakte/src/vk_thread.cpp') 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); } -- cgit v1.2.3