diff options
author | George Hazan <ghazan@miranda.im> | 2019-04-13 20:22:59 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-04-13 20:22:59 +0300 |
commit | 680873487c4a7987012606119a744e5ca725ad30 (patch) | |
tree | 8e5fbc68a253c3ec44287754c9295670f1ee44c3 /protocols/VKontakte/src/vk_chats.cpp | |
parent | 6c4136504c660bf3359e6641362672c4b9502be5 (diff) |
merge with trunk
Diffstat (limited to 'protocols/VKontakte/src/vk_chats.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_chats.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 0ade10a53c..ce8afc5a67 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -546,9 +546,12 @@ void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch) CVkInviteChatForm dlg(this);
if (dlg.DoModal() && dlg.m_hContact != 0) {
LONG uid = getDword(dlg.m_hContact, "ID", VK_INVALID_USER);
- if (uid != VK_INVALID_USER)
+
+ if (uid < 0)
+ MsgPopup(TranslateT("Adding bots to MUC is not supported"), TranslateT("Not supported"));
+ else if (uid != VK_INVALID_USER)
Push(new AsyncHttpRequest(this, REQUEST_GET, "/method/messages.addChatUser.json", true, &CVkProto::OnReceiveSmth)
- << INT_PARAM("user_id", uid < 0 ? 1000000000 - uid : uid)
+ << INT_PARAM("user_id", uid)
<< INT_PARAM("chat_id", cc->m_iChatId));
}
}
@@ -761,9 +764,14 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) if (!IsOnline())
return;
+ if (cu->m_uid < 0) {
+ MsgPopup(TranslateT("Kick bots is not supported"), TranslateT("Not supported"));
+ return;
+ }
+
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 < 0 ? 1000000000 - cu->m_uid : cu->m_uid));
+ << INT_PARAM("user_id", cu->m_uid));
cu->m_bUnknown = true;
break;
|