From cd7cb23ba12e11be6e0dc9199b603fb5321e87e1 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 24 Oct 2013 15:47:46 +0000 Subject: VK: fix for the correct status switching git-svn-id: http://svn.miranda-ng.org/main/trunk@6609 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_thread.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'protocols/VKontakte/src/vk_thread.cpp') 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); } -- cgit v1.2.3