diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-08-27 09:33:45 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-08-27 09:33:45 +0000 |
commit | 2c134afabafd96e0b238234ca69c216984b18336 (patch) | |
tree | fa8ef3df4e9e85741e221bcc8b7bb7104135bc5a | |
parent | 427359cbf083f5c5f709d68fd30bd08392ae57ca (diff) |
Vkontakte: fix r.15040 for MSVC2010
git-svn-id: http://svn.miranda-ng.org/main/trunk@15041 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index d4980914fc..f4408c3ea4 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -99,31 +99,31 @@ CVkChatInfo* CVkProto::AppendChat(int id, const JSONNode &jnDlg) void CVkProto::RetrieveChatInfo(CVkChatInfo *cc)
{
- CMString tszQuery(FORMAT, _T("var ChatId=%d;"), cc->m_chatid);
- tszQuery += _T("var Info=API.messages.getChat({\"chat_id\":ChatId});");
- tszQuery += _T("var ChatUsers=API.messages.getChatUsers({\"chat_id\":ChatId,\"fields\":\"id,first_name,last_name\"});");
+ CMStringA tszQuery(FORMAT, "var ChatId=%d;", cc->m_chatid);
+ tszQuery += "var Info=API.messages.getChat({\"chat_id\":ChatId});";
+ tszQuery += "var ChatUsers=API.messages.getChatUsers({\"chat_id\":ChatId,\"fields\":\"id,first_name,last_name\"});";
if (!cc->m_bHistoryRead) {
- tszQuery += _T("var ChatMsg=API.messages.getHistory({\"chat_id\":ChatId,\"count\":20,\"rev\":0});");
- tszQuery += _T("var FMsgs = ChatMsg.items@.fwd_messages;var Idx = 0;var Uids =[];while (Idx < FMsgs.length){"
+ tszQuery += "var ChatMsg=API.messages.getHistory({\"chat_id\":ChatId,\"count\":20,\"rev\":0});";
+ tszQuery += "var FMsgs = ChatMsg.items@.fwd_messages;var Idx = 0;var Uids =[];while (Idx < FMsgs.length){"
"var Jdx = 0;var CFMsgs = parseInt(FMsgs[Idx].length);while (Jdx < CFMsgs){"
"Uids.unshift(FMsgs[Idx][Jdx].user_id);Jdx = Jdx + 1;};Idx = Idx + 1;};"
- "var FUsers = API.users.get({\"user_ids\": Uids, \"name_case\":\"gen\"});");
- tszQuery += _T("var MsgUsers=API.users.get({\"user_ids\":ChatMsg.items@.user_id,\"fields\":\"id,first_name,last_name\"});");
+ "var FUsers = API.users.get({\"user_ids\": Uids, \"name_case\":\"gen\"});";
+ tszQuery += "var MsgUsers=API.users.get({\"user_ids\":ChatMsg.items@.user_id,\"fields\":\"id,first_name,last_name\"});";
}
- tszQuery += _T("return {\"info\":Info,\"users\":ChatUsers");
+ tszQuery += "return {\"info\":Info,\"users\":ChatUsers";
if (!cc->m_bHistoryRead)
- tszQuery += _T(",\"msgs\":ChatMsg,\"fwd_users\":FUsers,\"msgs_users\":MsgUsers");
+ tszQuery += ",\"msgs\":ChatMsg,\"fwd_users\":FUsers,\"msgs_users\":MsgUsers";
- tszQuery +=_T("};");
+ tszQuery +="};";
debugLogA("CVkProto::RetrieveChantInfo(%d)", cc->m_chatid);
if (!IsOnline())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/execute.json", true, &CVkProto::OnReceiveChatInfo)
- << TCHAR_PARAM("code", tszQuery)
+ << CHAR_PARAM("code", tszQuery)
<< VER_API)->pUserInfo = cc;
}
|