diff options
author | ElzorFox <elzorfox@ya.ru> | 2017-03-12 01:00:46 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2017-03-12 01:00:46 +0500 |
commit | 0d98bb5b0fafa594800048d76e37d37165818b05 (patch) | |
tree | e7af4e700037c61201105d6c167fbf4a2e96229f /protocols/VKontakte | |
parent | 4e925b0dd277356ac445bd8ca1bce51b65bbc77e (diff) |
VKontakte: sent track visitor on online
Diffstat (limited to 'protocols/VKontakte')
-rw-r--r-- | protocols/VKontakte/src/vk_proto.h | 1 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 2213a6ff6c..2a2ca47667 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -292,6 +292,7 @@ private: void OnReceiveStatus(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void OnReceiveStatusMsg(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
MCONTACT SetContactInfo(const JSONNode &jnItem, bool flag = false, bool self = false);
+ void TrackVisitor();
void RetrieveMyInfo(void);
void OnReceiveMyInfo(NETLIBHTTPREQUEST*, AsyncHttpRequest*);
void RetrieveUserInfo(LONG userId);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 719f6b287a..5eac85f764 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -227,6 +227,12 @@ void CVkProto::OnOAuthAuthorize(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq /////////////////////////////////////////////////////////////////////////////////////////
+void CVkProto::TrackVisitor()
+{
+ debugLogA("CVkProto::TrackVisitor");
+ Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/stats.trackVisitor.json", true, &CVkProto::OnReceiveSmth, AsyncHttpRequest::rpLow));
+}
+
void CVkProto::RetrieveMyInfo()
{
debugLogA("CVkProto::RetrieveMyInfo");
@@ -253,6 +259,7 @@ void CVkProto::OnReceiveMyInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) OnLoggedIn();
RetrieveUserInfo(m_myUserId);
+ TrackVisitor();
RetrieveUnreadMessages();
RetrieveFriends();
RetrievePollingInfo();
|