diff options
author | George Hazan <ghazan@miranda.im> | 2022-07-16 21:23:06 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-07-16 21:23:06 +0300 |
commit | cd4272ca22d47cdf673bfb0e5ec353acca3d9569 (patch) | |
tree | 0e2a4879766d8197cdf8a8fb6d5f5033399a0ea4 /plugins/SeenPlugin | |
parent | d6a052756f58211067a7a67d7e3c1dbe7e6c9465 (diff) |
Contact_IsGroupChat - a helper to detect chat rooms
Diffstat (limited to 'plugins/SeenPlugin')
-rw-r--r-- | plugins/SeenPlugin/src/menu.cpp | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/userinfo.cpp | 2 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index fc62ca1d0f..c24345000a 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -37,7 +37,7 @@ INT_PTR MenuitemClicked(WPARAM hContact, LPARAM) int BuildContactMenu(WPARAM hContact, LPARAM)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (!IsWatchedProtocol(szProto) || db_get_b(hContact, szProto, "ChatRoom", false) || !g_plugin.getByte("MenuItem", 1)) {
+ if (!IsWatchedProtocol(szProto) || Contact_IsGroupChat(hContact, szProto) || !g_plugin.getByte("MenuItem", 1)) {
Menu_ShowItem(hmenuitem, false);
return 0;
}
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index 1a323a5e11..fce8288f05 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -63,7 +63,7 @@ struct UserinfoDlg : public CUserInfoPageDlg int UserinfoInit(WPARAM wparam, LPARAM hContact)
{
char *szProto = Proto_GetBaseAccountName(hContact);
- if (IsWatchedProtocol(szProto) && !db_get_b(hContact, szProto, "ChatRoom", false)) {
+ if (IsWatchedProtocol(szProto) && !Contact_IsGroupChat(hContact, szProto)) {
USERINFOPAGE uip = {};
uip.szTitle.a = LPGEN("Last seen");
uip.pDialog = new UserinfoDlg();
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index ee2089f5a5..1a3bee9e55 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -555,7 +555,7 @@ int UpdateValues(WPARAM hContact, LPARAM lparam) g_plugin.setByte(hContact, "Offline", 0);
}
}
- else if (hContact && IsWatchedProtocol(cws->szModule) && !db_get_b(hContact, cws->szModule, "ChatRoom", false)) {
+ else if (hContact && IsWatchedProtocol(cws->szModule) && !Contact_IsGroupChat(hContact, cws->szModule)) {
// here we will come when <User>/<module>/Status is changed or it is idle event and if <module> is watched
if (Proto_GetStatus(cws->szModule) > ID_STATUS_OFFLINE) {
mir_cslock lck(csContacts);
|