summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-08-27 18:45:45 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-08-27 18:45:45 +0000
commitee46b2da0a78717c9ac1ca0739fe7f1f666377ce (patch)
tree894530e91c09ce757e3870e6ad41b5f01e542554 /protocols/VKontakte/src/vk_thread.cpp
parentd7d76938e05d7170668f4f950c40d65c47d1bb64 (diff)
VKontakte:
- fix for long chat messages; - fix for retrieveing user info on adding git-svn-id: http://svn.miranda-ng.org/main/trunk@10332 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index ebf5929b7a..681b8ef763 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -436,8 +436,11 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
if (pMsg == NULL)
continue;
- char szMid[40];
int mid = json_as_int(json_get(pMsg, "mid"));
+ if (!CheckMid(mid))
+ continue;
+
+ char szMid[40];
_itoa(mid, szMid, 10);
if (!mids.IsEmpty())
mids.AppendChar(',');
@@ -479,8 +482,8 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
recv.timestamp = datetime;
CMStringW szBody = ptszBody;
- szBody.Replace(_T("<br>"),_T("\n"));
- recv.tszMessage = (TCHAR *) szBody.c_str();
+ MyHtmlDecode(szBody);
+ recv.tszMessage = szBody.GetBuffer();
recv.lParam = isOut;
recv.pCustomData = szMid;