summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_thread.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-10-23 21:04:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-10-23 21:04:33 +0000
commit02c5b3e97608972a9aa6638bb73b31a4c6bddcfd (patch)
tree8fe733220a509b4f644043795de0bf72abc0d74a /protocols/VKontakte/src/vk_thread.cpp
parent6fd143b5c2f6e5d0c05657a9f7e8fe081a2447e2 (diff)
VK: forcing server offline status when going offline locally
git-svn-id: http://svn.miranda-ng.org/main/trunk@6605 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 2d71e576c2..bb0bbb844b 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -73,7 +73,11 @@ void CVkProto::OnLoggedOut()
int CVkProto::SetServerStatus(int iStatus)
{
- if (iStatus != ID_STATUS_OFFLINE && iStatus != ID_STATUS_INVISIBLE) {
+ if (iStatus == ID_STATUS_OFFLINE) {
+ HttpParam param = { "access_token", m_szAccessToken };
+ PushAsyncHttpRequest(REQUEST_GET, "/method/account.setOffline.json", true, &CVkProto::OnReceiveSmth, 1, &param);
+ }
+ else if (iStatus != ID_STATUS_INVISIBLE) {
HttpParam param = { "access_token", m_szAccessToken };
PushAsyncHttpRequest(REQUEST_GET, "/method/account.setOnline.json", true, &CVkProto::OnReceiveSmth, 1, &param);
}