summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp4
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)