diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-26 07:37:59 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2015-06-26 07:37:59 +0000 |
commit | deb05176bf259030db8d5f8ff7c68b5feb325770 (patch) | |
tree | d00388dd336d7ee56e3d60e45dcc218de489299e /protocols/VKontakte/src/vk_messages.cpp | |
parent | 3a548ab7449b7c6f444eb7e626636914926380fa (diff) |
VKontakte: code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14391 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_messages.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_messages.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/vk_messages.cpp b/protocols/VKontakte/src/vk_messages.cpp index 3eed6635d3..657c56471b 100644 --- a/protocols/VKontakte/src/vk_messages.cpp +++ b/protocols/VKontakte/src/vk_messages.cpp @@ -134,9 +134,7 @@ int CVkProto::OnDbEventRead(WPARAM hContact, LPARAM) void CVkProto::MarkMessagesRead(const CMStringA &mids)
{
debugLogA("CVkProto::MarkMessagesRead (mids)");
- if (!IsOnline())
- return;
- if (mids.IsEmpty())
+ if (!IsOnline() || mids.IsEmpty())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.markAsRead.json", true, &CVkProto::OnReceiveSmth, AsyncHttpRequest::rpLow)
@@ -161,9 +159,7 @@ void CVkProto::MarkMessagesRead(const MCONTACT hContact) void CVkProto::RetrieveMessagesByIds(const CMStringA &mids)
{
debugLogA("CVkProto::RetrieveMessagesByIds");
- if (!IsOnline())
- return;
- if (mids.IsEmpty())
+ if (!IsOnline() || mids.IsEmpty())
return;
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.getById.json", true, &CVkProto::OnReceiveMessages, AsyncHttpRequest::rpHigh)
@@ -212,7 +208,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe int uid = jnMsg["user_id"].as_int();
const JSONNode &jnFwdMessages = jnMsg["fwd_messages"];
- if (!jnFwdMessages.isnull()){
+ if (!jnFwdMessages.isnull()) {
CMString tszFwdMessages = GetFwdMessages(jnFwdMessages, m_iBBCForAttachments);
if (!tszBody.IsEmpty())
tszFwdMessages = _T("\n") + tszFwdMessages;
@@ -220,7 +216,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe }
const JSONNode &jnAttachments = jnMsg["attachments"];
- if (!jnAttachments.isnull()){
+ if (!jnAttachments.isnull()) {
CMString tszAttachmentDescr = GetAttachmentDescr(jnAttachments, m_iBBCForAttachments);
if (!tszBody.IsEmpty())
tszAttachmentDescr = _T("\n") + tszAttachmentDescr;
|