From 0746936b41f94cd39cb9760f2aa48799b5da4314 Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Wed, 5 Jun 2024 16:20:10 +0500 Subject: VKontakte: fix double cleaning server history after 4b53f58821f7adf0fdbe25af50c929927684e04e --- protocols/VKontakte/src/vk_proto.cpp | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index c89ccf4714..bc02d8347a 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -781,25 +781,8 @@ bool CVkProto::OnContactDeleted(MCONTACT hContact, uint32_t flags) if (!Contact::OnList(hContact) || getBool(hContact, "SilentDelete") || isChatRoom((MCONTACT)hContact)) return true; - VKUserID_t iUserId = ReadVKUserID(hContact); - if (iUserId == VK_INVALID_USER || iUserId == VK_FEED_USER) - return true; - - if (!(flags & CDF_DEL_HISTORY || flags & CDF_DEL_CONTACT)) - return true; - - CMStringA code(FORMAT, "var userID=\"%d\";", iUserId); - - if (flags & CDF_DEL_HISTORY) - code += "API.messages.deleteConversation({\"peer_id\":userID});"; - - if (flags & CDF_DEL_CONTACT && !getBool(hContact, "Auth", true)) - code += "API.friends.delete({\"user_id\":userID});"; - - code += "return 1;"; + SvcDeleteFriend(hContact, 1); - Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveSmth) - << CHAR_PARAM("code", code.c_str())); return true; } \ No newline at end of file -- cgit v1.2.3