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/Nudge/src/main.cpp | 6 ++---- plugins/Nudge/src/stdafx.h | 1 + 2 files changed, 3 insertions(+), 4 deletions(-) (limited to 'plugins/Nudge/src') diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index ee2ad72b2f..2b280f6a45 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -413,10 +413,8 @@ static int ContactWindowOpen(WPARAM, LPARAM lParam) static int PrebuildContactMenu(WPARAM hContact, LPARAM) { char *szProto = Proto_GetBaseAccountName(hContact); - if (szProto != nullptr) { - bool isChat = db_get_b(hContact, szProto, "ChatRoom", false) != 0; - NudgeShowMenu((WPARAM)szProto, !isChat); - } + if (szProto != nullptr) + NudgeShowMenu((WPARAM)szProto, !Contact_IsGroupChat(hContact, szProto)); return 0; } diff --git a/plugins/Nudge/src/stdafx.h b/plugins/Nudge/src/stdafx.h index 7ba2deb812..e0cc104911 100644 --- a/plugins/Nudge/src/stdafx.h +++ b/plugins/Nudge/src/stdafx.h @@ -11,6 +11,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3