From faaa001c53bb246f65583f1a526be9cbfa0fcaed Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 30 Oct 2024 20:26:17 +0300 Subject: fixes #4600 (tabSRMM: muted chats shall not create windows automatically) --- plugins/TabSRMM/src/container.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 0eafde8a99..d00b71e89f 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2294,6 +2294,9 @@ int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd) CMsgDialog* TSAPI AutoCreateWindow(TContainerData *pContainer, MCONTACT hContact, bool bActivate) { + if (Chat_IsMuted(hContact) == CHATMODE_MUTE) + return nullptr; + bool bAllowAutoCreate = false, bForceCreate = g_plugin.bAutoPopup || bActivate; uint32_t dwStatusMask = M.GetDword("autopopupmask", -1); @@ -2306,7 +2309,7 @@ CMsgDialog* TSAPI AutoCreateWindow(TContainerData *pContainer, MCONTACT hContact if (szProto) { int dwStatus = Proto_GetStatus(szProto); - if (dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE) + if (dwStatus == 0 || dwStatus <= ID_STATUS_OFFLINE || ((1 << (dwStatus - ID_STATUS_ONLINE)) & dwStatusMask)) bAllowAutoCreate = true; } } -- cgit v1.2.3