summaryrefslogtreecommitdiff
path: root/plugins/Nudge/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-07-16 21:23:06 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-07-16 21:23:06 +0300
commitcd4272ca22d47cdf673bfb0e5ec353acca3d9569 (patch)
tree0e2a4879766d8197cdf8a8fb6d5f5033399a0ea4 /plugins/Nudge/src
parentd6a052756f58211067a7a67d7e3c1dbe7e6c9465 (diff)
Contact_IsGroupChat - a helper to detect chat rooms
Diffstat (limited to 'plugins/Nudge/src')
-rw-r--r--plugins/Nudge/src/main.cpp6
-rw-r--r--plugins/Nudge/src/stdafx.h1
2 files changed, 3 insertions, 4 deletions
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 <newpluginapi.h>
#include <m_clistint.h>
+#include <m_contacts.h>
#include <m_langpack.h>
#include <m_popup.h>
#include <m_message.h>