From 0d98bb5b0fafa594800048d76e37d37165818b05 Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Sun, 12 Mar 2017 01:00:46 +0500 Subject: VKontakte: sent track visitor on online --- protocols/VKontakte/src/vk_proto.h | 1 + protocols/VKontakte/src/vk_thread.cpp | 7 +++++++ 2 files changed, 8 insertions(+) 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(); -- cgit v1.2.3