diff options
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;
|