From dbca94ca6e16a5bc270332e09ea3703bb46ceeaf Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Apr 2023 18:48:34 +0300 Subject: DbEventIsShown is added to g_chatApi to allow the core to filter group chat events too --- plugins/Scriver/src/chat_main.cpp | 1 + plugins/TabSRMM/src/chat_main.cpp | 3 ++- plugins/TabSRMM/src/msglog.cpp | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'plugins') diff --git a/plugins/Scriver/src/chat_main.cpp b/plugins/Scriver/src/chat_main.cpp index 0297bbef01..cee6777e6b 100644 --- a/plugins/Scriver/src/chat_main.cpp +++ b/plugins/Scriver/src/chat_main.cpp @@ -146,6 +146,7 @@ int Chat_Load() g_chatApi.OnFlashWindow = OnFlashWindow; g_chatApi.OnFlashHighlight = OnFlashHighlight; g_chatApi.ShowRoom = ShowRoom; + g_chatApi.DbEventIsShown = DbEventIsShown; Srmm_CreateHotkey(LPGEN("Messaging"), LPGEN("Action: Send message")); diff --git a/plugins/TabSRMM/src/chat_main.cpp b/plugins/TabSRMM/src/chat_main.cpp index 1a4a20082a..53e19d35a1 100644 --- a/plugins/TabSRMM/src/chat_main.cpp +++ b/plugins/TabSRMM/src/chat_main.cpp @@ -365,9 +365,10 @@ int Chat_Load() g_chatApi.OnCreateSession = OnCreateSession; g_chatApi.OnReplaceSession = OnReplaceSession; - g_chatApi.OnChangeNick = OnChangeNick; g_chatApi.ShowRoom = stubShowRoom; + g_chatApi.OnChangeNick = OnChangeNick; g_chatApi.OnLoadSettings = OnLoadSettings; + g_chatApi.DbEventIsShown = DbEventIsShown; Srmm_CreateHotkey(TABSRMM_HK_SECTION_GENERIC, LPGEN("Send message")); diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index 04045292b2..49743a5544 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -327,7 +327,7 @@ static wchar_t* Template_MakeRelativeDate(HANDLE hTimeZone, time_t check, wchar_ bool DbEventIsShown(const DB::EventInfo &dbei) { if (!IsCustomEvent(dbei.eventType) || dbei.isSrmm()) - return 1; + return true; return IsStatusEvent(dbei.eventType); } -- cgit v1.2.3