diff options
author | George Hazan <george.hazan@gmail.com> | 2015-02-13 19:15:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-02-13 19:15:58 +0000 |
commit | 7703c94a20e17edca4da21bc357db3116376ae6d (patch) | |
tree | 5e533284d00a07417fa391e52ba57b22084f4dc9 /protocols/WhatsApp/src/chat.cpp | |
parent | b9f7714070ea5673ee9d23d26b430eba04f1cf37 (diff) |
fix for nick name cleaning after chat deletion
git-svn-id: http://svn.miranda-ng.org/main/trunk@12101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/chat.cpp')
-rw-r--r-- | protocols/WhatsApp/src/chat.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index 16a3da88e3..8c5d83c7bb 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -261,6 +261,20 @@ void WhatsAppProto::KickChatUser(WAChatInfo *pInfo, const TCHAR *ptszJid) }
/////////////////////////////////////////////////////////////////////////////////////////
+// Leave groupchat emulator for contact's deletion
+
+int WhatsAppProto::OnDeleteChat(WPARAM hContact, LPARAM lParam)
+{
+ if (isChatRoom(hContact) && isOnline()) {
+ ptrT tszID(getTStringA(hContact, WHATSAPP_KEY_ID));
+ if (tszID)
+ m_pConnection->sendJoinLeaveGroup(_T2A(tszID), false);
+ }
+
+ return 0;
+}
+
+/////////////////////////////////////////////////////////////////////////////////////////
// handler to customize chat menus
int WhatsAppProto::OnChatMenu(WPARAM wParam, LPARAM lParam)
|