diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:47:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-24 15:47:46 +0000 |
commit | cd7cb23ba12e11be6e0dc9199b603fb5321e87e1 (patch) | |
tree | b894c86285d6b4553d9cdad8fb36d48ad2e93b57 /protocols/VKontakte/src/vk_thread.cpp | |
parent | 5e01c907bf4cace9542f880bae418f71c0fd0c07 (diff) |
VK: fix for the correct status switching
git-svn-id: http://svn.miranda-ng.org/main/trunk@6609 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index 5739321637..06098e56eb 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -73,15 +73,17 @@ void CVkProto::SetServerStatus(int iNewStatus) int iOldStatus = m_iStatus;
if (iNewStatus == ID_STATUS_OFFLINE) {
+ m_iStatus = ID_STATUS_OFFLINE;
HttpParam param = { "access_token", m_szAccessToken };
PushAsyncHttpRequest(REQUEST_GET, "/method/account.setOffline.json", true, &CVkProto::OnReceiveSmth, 1, ¶m);
}
else if (iNewStatus != ID_STATUS_INVISIBLE) {
+ m_iStatus = ID_STATUS_ONLINE;
HttpParam param = { "access_token", m_szAccessToken };
PushAsyncHttpRequest(REQUEST_GET, "/method/account.setOnline.json", true, &CVkProto::OnReceiveSmth, 1, ¶m);
}
+ else m_iStatus = ID_STATUS_INVISIBLE;
- m_iStatus = iNewStatus;
ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)iOldStatus, m_iStatus);
}
|