From ed4d2e70f154be0badfcc44afa04c0d8e984f03d Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Wed, 10 Sep 2014 04:27:14 +0000 Subject: VKontakte: redesign PARAM structure attempt 2, redesign AsyncHttpRequest structure git-svn-id: http://svn.miranda-ng.org/main/trunk@10415 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_chats.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'protocols/VKontakte/src/vk_chats.cpp') diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index c8d041157a..00976c57e9 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -338,12 +338,10 @@ int CVkProto::OnChatEvent(WPARAM, LPARAM lParam) UnEscapeChatTags(buf); // need rework - change reply format and type not supported yet AsyncHttpRequest *pReq = new AsyncHttpRequest(this, REQUEST_POST, "/method/messages.send.json", true, &CVkProto::OnSendChatMsg) - << INT_PARAM("type", 1) << INT_PARAM("chat_id", cc->m_chatid); + << INT_PARAM("type", 1) + << INT_PARAM("chat_id", cc->m_chatid) + << CHAR_PARAM("message", mir_utf8encodeT(buf)); pReq->AddHeader("Content-Type", "application/x-www-form-urlencoded"); - - CMStringA szBody(FORMAT, "message=%s", ptrA(mir_urlEncode(mir_utf8encodeT(buf)))); - pReq->pData = mir_strdup(szBody); - pReq->dataLength = szBody.GetLength(); Push(pReq); } -- cgit v1.2.3