summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_chats.cpp
diff options
context:
space:
mode:
authorSergey Bolhovskoy <elzorfox@ya.ru>2014-09-10 04:27:14 +0000
committerSergey Bolhovskoy <elzorfox@ya.ru>2014-09-10 04:27:14 +0000
commited4d2e70f154be0badfcc44afa04c0d8e984f03d (patch)
tree8debabb11e2080690ff5f4ba18c55b6d16ad8b98 /protocols/VKontakte/src/vk_chats.cpp
parent18a97b56e7042d69af69f0f5bf4c13436675ebc4 (diff)
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
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp8
1 files changed, 3 insertions, 5 deletions
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);
}