summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--protocols/VKontakte/src/vk_proto.cpp19
1 files changed, 1 insertions, 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