From cd4272ca22d47cdf673bfb0e5ec353acca3d9569 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 16 Jul 2022 21:23:06 +0300 Subject: Contact_IsGroupChat - a helper to detect chat rooms --- plugins/SimpleStatusMsg/src/awaymsg.cpp | 2 +- plugins/SimpleStatusMsg/src/stdafx.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'plugins/SimpleStatusMsg') diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index 21e5416762..13f73b6b57 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -294,7 +294,7 @@ static int AwayMsgPreBuildMenu(WPARAM hContact, LPARAM) Menu_ShowItem(hAwayMsgMenuItem, false); char *szProto = Proto_GetBaseAccountName(hContact); - if (szProto == nullptr || db_get_b(hContact, szProto, "ChatRoom", 0)) + if (szProto == nullptr || Contact_IsGroupChat(hContact, szProto)) return 0; int iStatus = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE); diff --git a/plugins/SimpleStatusMsg/src/stdafx.h b/plugins/SimpleStatusMsg/src/stdafx.h index 402d93dab3..04eaf6ed1d 100644 --- a/plugins/SimpleStatusMsg/src/stdafx.h +++ b/plugins/SimpleStatusMsg/src/stdafx.h @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc., #include #include #include +#include #include #include #include -- cgit v1.2.3