From 78b370670a1bc42540b8bd907d2619e829d98b3f Mon Sep 17 00:00:00 2001 From: ElzorFox Date: Sat, 24 May 2025 13:07:52 +0500 Subject: VKontakte: switching back to official last API version fix #5027 version bump --- protocols/VKontakte/src/version.h | 2 +- protocols/VKontakte/src/vk.h | 2 +- protocols/VKontakte/src/vk_files.cpp | 8 +++----- 3 files changed, 5 insertions(+), 7 deletions(-) diff --git a/protocols/VKontakte/src/version.h b/protocols/VKontakte/src/version.h index 2c5f916731..c7d2f51ba6 100644 --- a/protocols/VKontakte/src/version.h +++ b/protocols/VKontakte/src/version.h @@ -1,7 +1,7 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 1 #define __RELEASE_NUM 18 -#define __BUILD_NUM 6 +#define __BUILD_NUM 7 #include diff --git a/protocols/VKontakte/src/vk.h b/protocols/VKontakte/src/vk.h index e15484cb7f..9a9eb2e580 100644 --- a/protocols/VKontakte/src/vk.h +++ b/protocols/VKontakte/src/vk.h @@ -88,7 +88,7 @@ along with this program. If not, see . #define VK_USER_DEACTIVATE_ACTION 9321 -#define VK_API_VER "5.236" +#define VK_API_VER "5.199" #define VER_API CHAR_PARAM("v", VK_API_VER) #define VK_FEED_USER 2147483647L diff --git a/protocols/VKontakte/src/vk_files.cpp b/protocols/VKontakte/src/vk_files.cpp index a82af7f7a9..24b7c943e1 100644 --- a/protocols/VKontakte/src/vk_files.cpp +++ b/protocols/VKontakte/src/vk_files.cpp @@ -494,8 +494,6 @@ void CVkProto::OnReciveUploadFile(MHttpResponse *reply, AsyncHttpRequest *pReq) } pMsgReq << INT_PARAM("chat_id", cc->m_iChatId); - pMsgReq->pUserInfo = pReq->pUserInfo; - } else { VKUserID_t iUserId = ReadVKUserID(fup->hContact); @@ -505,15 +503,15 @@ void CVkProto::OnReciveUploadFile(MHttpResponse *reply, AsyncHttpRequest *pReq) } pMsgReq << INT_PARAM("peer_id", iUserId); - pMsgReq->pUserInfo = new CVkSendMsgParam(fup->hContact, fup); } - + ULONG uMsgId = ::InterlockedIncrement(&m_iMsgId); pMsgReq << WCHAR_PARAM("message", fup->wszDesc) << WCHAR_PARAM("attachment", Attachment) << INT_PARAM("random_id", ((long)time(0)) * 100 + uMsgId % 100); - pMsgReq->AddHeader("Content-Type", "application/x-www-form-urlencoded"); + pMsgReq->pUserInfo = new CVkSendMsgParam(fup->hContact, fup); + Push(pMsgReq); } \ No newline at end of file -- cgit v1.2.3