summaryrefslogtreecommitdiff
path: root/protocols/JabberG
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber_list.h2
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp2
-rwxr-xr-xprotocols/JabberG/src/jabber_opt.cpp1
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.cpp5
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.h1
5 files changed, 7 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h
index fd773eaf96..009e0e7ab8 100644
--- a/protocols/JabberG/src/jabber_list.h
+++ b/protocols/JabberG/src/jabber_list.h
@@ -110,7 +110,7 @@ public:
JabberCapsBits m_jcbManualDiscoveredCaps;
// XEP-0085 gone event support
- BOOL m_bMessageSessionActive;
+ bool m_bMessageSessionActive;
};
class pResourceStatus
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index f404e52c04..6bb8ec5444 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -831,7 +831,7 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
if (r && r->m_bMessageSessionActive) {
r->m_bMessageSessionActive = false;
- if (GetResourceCapabilities(jid) & JABBER_CAPS_CHATSTATES)
+ if (m_bEnableChatStates && (GetResourceCapabilities(jid, r) & JABBER_CAPS_CHATSTATES))
m_ThreadInfo->send(XmlNode("message") << XATTR("to", jid) << XATTR("type", "chat") << XATTRID(SerialNext()) << XCHILDNS("gone", JABBER_FEAT_CHATSTATES));
}
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp
index e6a44883e1..079742b2f1 100755
--- a/protocols/JabberG/src/jabber_opt.cpp
+++ b/protocols/JabberG/src/jabber_opt.cpp
@@ -769,6 +769,7 @@ public:
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Receive notes"), m_proto->m_bAcceptNotes);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Automatically save received notes"), m_proto->m_bAutosaveNotes);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Inline pictures in messages (XEP-0231)"), m_proto->m_bInlinePictures);
+ m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Enable chat states sending (XEP-0085)"), m_proto->m_bEnableChatStates);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Enable server-side history (XEP-0136)"), m_proto->m_bEnableMsgArchive);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Enable carbon copies (XEP-0280)"), m_proto->m_bEnableCarbons);
m_otvOptions.AddOption(LPGENW("Messaging") L"/" LPGENW("Use Stream Management (XEP-0198) if possible (Testing)"), m_proto->m_bEnableStreamMgmt);
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp
index 8980e02cba..09384da56e 100755
--- a/protocols/JabberG/src/jabber_proto.cpp
+++ b/protocols/JabberG/src/jabber_proto.cpp
@@ -92,6 +92,7 @@ CJabberProto::CJabberProto(const char *aProtoName, const wchar_t *aUserName) :
m_bDisableFrame(this, "DisableFrame", true),
m_bEnableAvatars(this, "EnableAvatars", true),
m_bEnableCarbons(this, "EnableCarbons", true),
+ m_bEnableChatStates(this, "EnableChatStates", true),
m_bEnableMsgArchive(this, "EnableMsgArchive", false),
m_bEnableRemoteControl(this, "EnableRemoteControl", false),
m_bEnableStreamMgmt(this, "UseStreamMgmt", false),
@@ -963,7 +964,7 @@ int CJabberProto::SendMsg(MCONTACT hContact, int unused_unknown, const char *psz
if (jcb & JABBER_RESOURCE_CAPS_ERROR)
jcb = JABBER_RESOURCE_CAPS_NONE;
- if (jcb & JABBER_CAPS_CHATSTATES)
+ if (m_bEnableChatStates && (jcb & JABBER_CAPS_CHATSTATES))
m << XCHILDNS("active", JABBER_FEAT_CHATSTATES);
m << XATTR("to", szClientJid);
@@ -1207,7 +1208,7 @@ int CJabberProto::UserIsTyping(MCONTACT hContact, int type)
XmlNode m("message"); XmlAddAttr(m, "to", szClientJid);
- if (jcb & JABBER_CAPS_CHATSTATES) {
+ if (m_bEnableChatStates && (jcb & JABBER_CAPS_CHATSTATES)) {
m << XATTR("type", "chat") << XATTRID(SerialNext());
switch (type) {
case PROTOTYPE_SELFTYPING_OFF:
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 110eb41083..dcbf5984ea 100755
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -189,6 +189,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
CMOption<bool> m_bDisableFrame;
CMOption<bool> m_bEnableAvatars;
CMOption<bool> m_bEnableCarbons;
+ CMOption<bool> m_bEnableChatStates;
CMOption<bool> m_bEnableMsgArchive;
CMOption<bool> m_bEnableRemoteControl;
CMOption<bool> m_bEnableStreamMgmt;