diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-11 15:12:30 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-11 15:12:30 +0000 |
commit | 04e6d5b7dd9e465153c6f028911a4220d553389a (patch) | |
tree | 2986d45676b1cc163ed000e1b442565e85210c74 /protocols/VKontakte/src | |
parent | e8cfaff4970726c7f15c0241e0c6b210ead2f0bd (diff) |
VKontakte: fix for destroy 'empty' chat
git-svn-id: http://svn.miranda-ng.org/main/trunk@10765 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index d559450383..709b68f1cd 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -454,7 +454,7 @@ void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch) CMStringA code;
code.Format("var Hist = API.messages.getHistory({\"chat_id\":%d, \"count\":200});"
"var countMsg = Hist.count;var itemsMsg = Hist.items@.id; "
- "while (countMsg > 1) { API.messages.delete({\"message_ids\":itemsMsg});"
+ "while (countMsg > 0) { API.messages.delete({\"message_ids\":itemsMsg});"
"Hist=API.messages.getHistory({\"chat_id\":%d, \"count\":200});"
"countMsg = Hist.count;itemsMsg = Hist.items@.id;}; return 1;", cc->m_chatid, cc->m_chatid);
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnChatDestroy)
@@ -483,7 +483,7 @@ INT_PTR __cdecl CVkProto::OnLeaveChat(WPARAM hContact, LPARAM) CMStringA code;
code.Format("var Hist = API.messages.getHistory({\"chat_id\":%d, \"count\":200});"
"var countMsg = Hist.count;var itemsMsg = Hist.items@.id; "
- "while (countMsg > 1) { API.messages.delete({\"message_ids\":itemsMsg});"
+ "while (countMsg > 0) { API.messages.delete({\"message_ids\":itemsMsg});"
"Hist=API.messages.getHistory({\"chat_id\":%d, \"count\":200});"
"countMsg = Hist.count;itemsMsg = Hist.items@.id;}; return 1;", cc->m_chatid, cc->m_chatid);
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnChatDestroy)
|