diff options
author | George Hazan <george.hazan@gmail.com> | 2014-08-27 18:45:45 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-08-27 18:45:45 +0000 |
commit | ee46b2da0a78717c9ac1ca0739fe7f1f666377ce (patch) | |
tree | 894530e91c09ce757e3870e6ad41b5f01e542554 /protocols/VKontakte/src/vk_thread.cpp | |
parent | d7d76938e05d7170668f4f950c40d65c47d1bb64 (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.cpp | 9 |
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;
|