From fbe350dc61621e78c82e8caff865a681a6a3b8c2 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 8 Sep 2014 06:05:39 +0000 Subject: VKontakte: upgrade vk api version to 5.24 - messages.send git-svn-id: http://svn.miranda-ng.org/main/trunk@10404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_proto.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'protocols/VKontakte') diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 63467a2cd4..6d8df49e5c 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -203,11 +203,10 @@ int CVkProto::SendMsg(MCONTACT hContact, int flags, const char *msg) szMsg = mir_utf8encode(msg); ULONG msgId = ::InterlockedIncrement(&m_msgId); - // need rework - change reply format and uid => user_id, type not supported yet AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, "/method/messages.send.json", true, &CVkProto::OnSendMessage) - << INT_PARAM("type", 0) << INT_PARAM("uid", userID); + << INT_PARAM("user_id", userID) + << VER_API; pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded"); - CMStringA szBody(FORMAT, "message=%s", ptrA(mir_urlEncode(szMsg))); pReq->pData = mir_strdup(szBody); pReq->dataLength = szBody.GetLength(); -- cgit v1.2.3