From a864139555f85d02850a07bbf56f3abcf2946f1f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 7 May 2020 21:00:49 +0300 Subject: fixes #2399 (XEP-0280 support cleaning) --- protocols/JabberG/src/jabber_iqid.cpp | 6 ++++-- protocols/JabberG/src/jabber_proto.h | 2 -- protocols/JabberG/src/jabber_thread.cpp | 9 --------- 3 files changed, 4 insertions(+), 13 deletions(-) (limited to 'protocols') diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 4447a88c77..8e1125b221 100755 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -129,8 +129,10 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq) if (info->jabberServerCaps & JABBER_CAPS_ARCHIVE_AUTO) EnableArchive(m_bEnableMsgArchive != 0); - if (info->jabberServerCaps & JABBER_CAPS_CARBONS) - EnableCarbons(m_bEnableCarbons != 0); + if (info->jabberServerCaps & JABBER_CAPS_CARBONS) { + // Server seems to support carbon copies, let's enable/disable them + m_ThreadInfo->send(XmlNodeIq("set", SerialNext()) << XCHILDNS((m_bEnableCarbons) ? "enable" : "disable", JABBER_FEAT_CARBONS)); + } if (m_bAutoJoinBookmarks) { LIST ll(10); diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 99a116768f..e9dc4d65eb 100755 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -830,8 +830,6 @@ struct CJabberProto : public PROTO, public IJabberInterface bool ProcessCaptcha(const TiXmlElement *node, const TiXmlElement *parentNode, ThreadData *info); - void EnableCarbons(bool bEnable); - //---- jabber_util.c ----------------------------------------------------------------- pResourceStatus ResourceInfoFromJID(const char *jid); diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index df2a582355..b8c0206230 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1923,15 +1923,6 @@ void CJabberProto::OnProcessRegIq(const TiXmlElement *node, ThreadData *info) } } -///////////////////////////////////////////////////////////////////////////////////////// -// Carbons -- this might need to go into its own module - -void CJabberProto::EnableCarbons(bool bEnable) -{ - m_ThreadInfo->send(XmlNodeIq("set", SerialNext()) - << XCHILDNS((bEnable) ? "enable" : "disable", JABBER_FEAT_CARBONS)); -} - ///////////////////////////////////////////////////////////////////////////////////////// // ThreadData constructor & destructor -- cgit v1.2.3