diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-16 09:15:31 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-16 09:15:31 +0000 |
commit | 1f53603a20c3cccc23f001f5e9fcabee97afd100 (patch) | |
tree | 6b94e2d5e3498149057d124f41f5f25ffe57bb84 /protocols/VKontakte/src/vk_thread.cpp | |
parent | f71c05fadaa38b0719f75d8ba5fc26ea230b478e (diff) |
VKontakte:
add destroy options for offline chats
more processing for kick and invite
git-svn-id: http://svn.miranda-ng.org/main/trunk@10795 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_thread.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_thread.cpp | 14 |
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;
}
|