diff options
Diffstat (limited to 'protocols/VKontakte/src/vk_history.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_history.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_history.cpp b/protocols/VKontakte/src/vk_history.cpp index b9e4a56967..198c75fec4 100644 --- a/protocols/VKontakte/src/vk_history.cpp +++ b/protocols/VKontakte/src/vk_history.cpp @@ -18,6 +18,20 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
//////////////////////////// History services ///////////////////////////////////////////
+INT_PTR CVkProto::SvcEmptyServerHistory(WPARAM hContact, LPARAM lParam)
+{
+ debugLogA("CVkProto::SvcEmptyServerHistory was called for %s", Clist_GetContactDisplayName(hContact));
+
+ VKUserID_t iUserId = ReadVKUserID(hContact);
+ if (iUserId == VK_INVALID_USER || !IsOnline() || iUserId == VK_FEED_USER || isChatRoom(hContact))
+ return 1;
+
+ Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.deleteConversation.json", true, &CVkProto::OnReceiveSmth, AsyncHttpRequest::rpLow)
+ << INT_PARAM("peer_id", iUserId));
+
+ return 0;
+}
+
INT_PTR __cdecl CVkProto::SvcGetAllServerHistoryForContact(WPARAM hContact, LPARAM)
{
|