summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_chats.cpp
diff options
context:
space:
mode:
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);
}