summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r--protocols/VKontakte/src/vk_thread.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp
index 4089e27ed0..fe75ca477c 100644
--- a/protocols/VKontakte/src/vk_thread.cpp
+++ b/protocols/VKontakte/src/vk_thread.cpp
@@ -574,10 +574,18 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe
if (chat_id != 0) {
CMString action_chat = json_as_string(json_get(pMsg, "action"));
- CMString action_mid = json_as_string(json_get(pMsg, "action_mid"));
- if ((action_chat == "chat_kick_user") && (_ttoi(action_mid.GetBuffer()) == m_myUserId))
+ int action_mid = _ttoi(json_as_string(json_get(pMsg, "action_mid")));
+ if ((action_chat == "chat_kick_user") && (action_mid == m_myUserId))
KickFromChat(chat_id, uid, pMsg);
- else
+ else if ((action_chat == "chat_invite_user") && (action_mid == m_myUserId)){
+ MCONTACT chatContact = FindChat(chat_id);
+ if (chatContact){
+ db_unset(chatContact, m_szModuleName, "kicked");
+ db_unset(chatContact, m_szModuleName, "off");
+ }
+ AppendChatMessage(chat_id, pMsg, false);
+ }
+ else
AppendChatMessage(chat_id, pMsg, false);
continue;
}