diff options
author | ElzorFox <elzorfox@ya.ru> | 2019-03-28 19:30:16 +0500 |
---|---|---|
committer | ElzorFox <elzorfox@ya.ru> | 2019-03-28 19:30:16 +0500 |
commit | 4c93f2b20218e943f61d0a399aa3d11aa01506a7 (patch) | |
tree | ed07f0d99770428e87b94b8ec990506b4c66feca /protocols/VKontakte/src | |
parent | 45ebf302dd5b679c9bfb9da227ca42b9192699e8 (diff) |
VKontakte:
fix (?) add groups user to friend list
fix add/remove groups user to/from muc
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 4 | ||||
-rw-r--r-- | protocols/VKontakte/src/vk_proto.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 377c7c076f..0ade10a53c 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -548,7 +548,7 @@ void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch) LONG uid = getDword(dlg.m_hContact, "ID", VK_INVALID_USER);
if (uid != VK_INVALID_USER)
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.addChatUser.json", true, &CVkProto::OnReceiveSmth)
- << INT_PARAM("user_id", uid)
+ << INT_PARAM("user_id", uid < 0 ? 1000000000 - uid : uid)
<< INT_PARAM("chat_id", cc->m_iChatId));
}
}
@@ -763,7 +763,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.removeChatUser.json", true, &CVkProto::OnReceiveSmth)
<< INT_PARAM("chat_id", cc->m_iChatId)
- << INT_PARAM("user_id", cu->m_uid));
+ << INT_PARAM("user_id", cu->m_uid < 0 ? 1000000000 - cu->m_uid : cu->m_uid));
cu->m_bUnknown = true;
break;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 10e1a2693f..463518635c 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -530,6 +530,10 @@ int CVkProto::AuthRequest(MCONTACT hContact, const wchar_t *message) if (userID == VK_INVALID_USER || !hContact || userID == VK_FEED_USER)
return 1;
+ if (userID < 0)
+ userID = 1000000000 - userID;
+
+
wchar_t msg[501] = { 0 };
if (message)
wcsncpy_s(msg, _countof(msg), message, _TRUNCATE);
|