summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/delphi/m_protosvc.inc1
-rw-r--r--include/m_protosvc.h1
-rw-r--r--src/core/stdfile/file.cpp3
3 files changed, 4 insertions, 1 deletions
diff --git a/include/delphi/m_protosvc.inc b/include/delphi/m_protosvc.inc
index 36c20984d9..fff2e30ad6 100644
--- a/include/delphi/m_protosvc.inc
+++ b/include/delphi/m_protosvc.inc
@@ -128,6 +128,7 @@ const
PF4_IMSENDOFFLINE = $00000100; // protocol supports sending offline messages (v0.8.0+)
PF4_INFOSETTINGSVC = $00000200; // protocol supports user info translation services (v0.8.0+)
PF4_NOAUTHDENYREASON = $00000400; // protocol doesn't support authorization deny reason (v0.9.0+)
+ PF4_GROUPCHATFILES = $00000800; // protocol supports sending files to group chats (v0.95.2+)
PFLAG_UNIQUEIDTEXT = 100; // returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL
PFLAG_MAXCONTACTSPERPACKET = 200; // v0.1.2.2+: returns the maximum number of contacts which can be sent in a single PSS_CONTACTS. lParam=(LPARAM)hContact.
diff --git a/include/m_protosvc.h b/include/m_protosvc.h
index 1a5dd3d817..fa5c3cb3ad 100644
--- a/include/m_protosvc.h
+++ b/include/m_protosvc.h
@@ -143,6 +143,7 @@ static __inline unsigned long Proto_Status2Flag(int status)
#define PF4_IMSENDOFFLINE 0x00000100 // protocol supports sending offline messages (v0.8.0+)
#define PF4_INFOSETTINGSVC 0x00000200 // protocol supports user info translation services (v0.8.0+)
#define PF4_NOAUTHDENYREASON 0x00000400 // protocol doesn't support authorization deny reason (v0.9.0+)
+#define PF4_GROUPCHATFILES 0x00000800 // protocol supports sending files to group chats (v0.95.2+)
#define PFLAG_UNIQUEIDTEXT 100 //returns a static buffer of text describing the unique field by which this protocol identifies users (already translated), or NULL
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp
index 97b7d9549d..413a202751 100644
--- a/src/core/stdfile/file.cpp
+++ b/src/core/stdfile/file.cpp
@@ -308,7 +308,8 @@ static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
bool bEnabled = false;
char *szProto = GetContactProto(wParam);
if (szProto != NULL) {
- if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
+ bool isChat = db_get_b(wParam, szProto, "ChatRoom", false) != 0;
+ if (CallProtoService(szProto, PS_GETCAPS, isChat ? PFLAGNUM_4 : PFLAGNUM_1, 0) & (isChat ? PF4_GROUPCHATFILES : PF1_FILESEND)) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
else if (db_get_w(wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)