summaryrefslogtreecommitdiff
path: root/protocols/VKontakte
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-12 16:23:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-12 16:23:54 +0000
commitf7c71fc51a21f0a5956b49538510d919c1a87f67 (patch)
treee42ce747ad7af19653c8bc38feec3ace7a0b85c5 /protocols/VKontakte
parente43a6cf4dda70ba49757dcb9e1e476857ed9fb10 (diff)
d-damn
git-svn-id: http://svn.miranda-ng.org/main/trunk@7619 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r--protocols/VKontakte/src/vk_chats.cpp5
-rw-r--r--protocols/VKontakte/src/vk_proto.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp
index 73974134dc..6d12db1153 100644
--- a/protocols/VKontakte/src/vk_chats.cpp
+++ b/protocols/VKontakte/src/vk_chats.cpp
@@ -192,7 +192,6 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
JSONNODE *msgs = json_as_array(json_get(pResponse, "msgs"));
if (msgs != NULL) {
- cc->m_bHistoryRead = true;
for (int i = 1;; i++) {
JSONNODE *pMsg = json_at(msgs, i);
if (pMsg == NULL)
@@ -200,11 +199,12 @@ void CVkProto::OnReceiveChatInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
AppendChatMessage(cc->m_chatid, pMsg, true);
}
+ cc->m_bHistoryRead = true;
}
for (int j = 0; j < cc->m_msgs.getCount(); j++) {
CVkChatMessage &p = cc->m_msgs[j];
- AppendChatMessage(cc, p.m_mid, p.m_uid, p.m_date, p.m_tszBody, false);
+ AppendChatMessage(cc, p.m_mid, p.m_uid, p.m_date, p.m_tszBody, p.m_bHistory);
}
cc->m_msgs.destroy();
}
@@ -241,6 +241,7 @@ void CVkProto::AppendChatMessage(int id, JSONNODE *pMsg, bool bIsHistory)
cm->m_uid = uid;
cm->m_date = msgTime;
cm->m_tszBody = tszBody.detouch();
+ cm->m_bHistory = bIsHistory;
}
}
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h
index 8d46429b69..af3bddfa5a 100644
--- a/protocols/VKontakte/src/vk_proto.h
+++ b/protocols/VKontakte/src/vk_proto.h
@@ -76,6 +76,7 @@ struct CVkChatMessage : public MZeroedObject
CVkChatMessage(int _id) : m_mid(_id) {}
int m_mid, m_uid, m_date;
+ bool m_bHistory;
ptrT m_tszBody;
};