From 3f85b15bfb0f49b3ecc2da23060f4a2d6d3ad372 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 15 Sep 2014 03:43:29 +0000 Subject: VKontakte: upgrade vk api version to 5.24 - complete bugfix for StatusMsg freeze acceleration avatars loading some cleanup git-svn-id: http://svn.miranda-ng.org/main/trunk@10448 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_queue.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'protocols/VKontakte/src/vk_queue.cpp') diff --git a/protocols/VKontakte/src/vk_queue.cpp b/protocols/VKontakte/src/vk_queue.cpp index c1934fa190..b736fad51a 100644 --- a/protocols/VKontakte/src/vk_queue.cpp +++ b/protocols/VKontakte/src/vk_queue.cpp @@ -91,10 +91,13 @@ void CVkProto::WorkerThread(void*) else { // Initialize new OAuth session extern char szBlankUrl[]; - //need rework Push(new AsyncHttpRequest(this, REQUEST_GET, "/oauth/authorize", false, &CVkProto::OnOAuthAuthorize) - << INT_PARAM("client_id", VK_APP_ID) << CHAR_PARAM("scope", "friends,photos,audio,video,wall,messages,offline") - << CHAR_PARAM("redirect_uri", szBlankUrl) << CHAR_PARAM("display", "wap") << CHAR_PARAM("response_type", "token")); + << INT_PARAM("client_id", VK_APP_ID) + << CHAR_PARAM("scope", "friends,photos,audio,video,wall,messages,offline,status") + << CHAR_PARAM("redirect_uri", szBlankUrl) + << CHAR_PARAM("display", "mobile") + << CHAR_PARAM("response_type", "token") + << VER_API)->m_bApiReq = false;; } while(true) { @@ -112,7 +115,7 @@ void CVkProto::WorkerThread(void*) pReq = m_arRequestsQueue[0]; m_arRequestsQueue.remove(0); - need_sleep = (m_arRequestsQueue.getCount() > 1); // more than two to not gather + need_sleep = (m_arRequestsQueue.getCount() > 1) && (pReq->m_bApiReq); // more than two to not gather } ExecuteRequest(pReq); if (need_sleep) // There can be maximum 3 requests to API methods per second from a client -- cgit v1.2.3