summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-12-05 11:38:31 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-12-05 11:38:31 +0300
commit6ab8095788096969e9abea7be524b10d306d8132 (patch)
tree89487a5dc1f1eaf3cde408a7d1b9c043c9477340
parent644950a906fa7f8e7091488fd9ff5006fcb7a035 (diff)
fixes #4017 (События входа/выхода в чате остаются в журнале даже после очистки истории)
-rw-r--r--src/mir_app/src/srmm_main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mir_app/src/srmm_main.cpp b/src/mir_app/src/srmm_main.cpp
index 54fe37b369..677d3e5cda 100644
--- a/src/mir_app/src/srmm_main.cpp
+++ b/src/mir_app/src/srmm_main.cpp
@@ -17,6 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "stdafx.h"
+#include "chat.h"
HCURSOR g_hCurHyperlinkHand;
HANDLE hHookIconsChanged, hHookIconPressedEvt, hHookSrmmEvent;
@@ -42,6 +43,11 @@ static INT_PTR svcEmptyHistory(WPARAM hContact, LPARAM lParam)
DB::ECPTR pCursor(DB::Events(hContact));
while (pCursor.FetchNext())
pCursor.DeleteEvent();
+
+ if (Contact::IsGroupChat(hContact))
+ if (auto *si = SM_FindSessionByContact(hContact))
+ Chat_EmptyHistory(si);
+
return 0;
}