diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-25 14:49:20 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-25 14:49:20 +0300 |
commit | 27d82200ded3da7e718bfef2cd50ab7ef18050dc (patch) | |
tree | 33324529732484aa50b05d4a6647946179930c00 | |
parent | 9e6269ede3d41302ce7b9ca80916a033837bd897 (diff) |
fixes #3456 (Не удаляется ChatCache при удалении учётки)
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index 6d994c9f38..af2127b0d5 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -861,9 +861,13 @@ static int OnEventAdded(WPARAM hContact, LPARAM hDbEvent) static int OnContactDeleted(WPARAM hContact, LPARAM)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (szProto && Contact::IsGroupChat(hContact, szProto))
+ if (szProto && Contact::IsGroupChat(hContact, szProto)) {
+ if (auto *si = SM_FindSessionByContact(hContact))
+ _wremove(Chat_GetFolderName(si));
+
if (Contact::GetStatus(hContact) != ID_STATUS_OFFLINE)
CallProtoService(szProto, PS_LEAVECHAT, hContact, 0);
+ }
return 0;
}
|