From 7703c94a20e17edca4da21bc357db3116376ae6d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 13 Feb 2015 19:15:58 +0000 Subject: fix for nick name cleaning after chat deletion git-svn-id: http://svn.miranda-ng.org/main/trunk@12101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/chat.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'protocols/WhatsApp/src/chat.cpp') 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 @@ -260,6 +260,20 @@ void WhatsAppProto::KickChatUser(WAChatInfo *pInfo, const TCHAR *ptszJid) m_pConnection->sendRemoveParticipants(gjid, jids); } +///////////////////////////////////////////////////////////////////////////////////////// +// 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 -- cgit v1.2.3