diff --git a/src/common/gajim.py b/src/common/gajim.py index c9ba1fff3..bc9228f23 100644 --- a/src/common/gajim.py +++ b/src/common/gajim.py @@ -176,9 +176,6 @@ gajim_common_features = [xmpp.NS_BYTESTREAM, xmpp.NS_SI, 'msglog', 'sslc2s', 'stringprep', xmpp.NS_PING, xmpp.NS_TIME_REVISED, xmpp.NS_GAMING] -if HAVE_PYCRYPTO: - gajim_common_features.append(xmpp.NS_ESESSION) - # Optional features gajim supports per account gajim_optional_features = {} diff --git a/src/common/helpers.py b/src/common/helpers.py index 44252f89c..8ab3e526a 100644 --- a/src/common/helpers.py +++ b/src/common/helpers.py @@ -1340,8 +1340,9 @@ def update_optional_features(account = None): gajim.gajim_optional_features[a].append(xmpp.NS_CHATSTATES) if not gajim.config.get('ignore_incoming_xhtml'): gajim.gajim_optional_features[a].append(xmpp.NS_XHTML_IM) - if gajim.HAVE_PYCRYPTO: - gajim.gajim_optional_features[a].append(xmpp.NS_ESESSION_INIT) + if gajim.HAVE_PYCRYPTO and \ + gajim.config.get_per('accounts', a, 'autonegotiate_esessions'): + gajim.gajim_optional_features[a].append(xmpp.NS_ESESSION) if gajim.config.get_per('accounts', a, 'answer_receipts'): gajim.gajim_optional_features[a].append(xmpp.NS_RECEIPTS) gajim.caps_hash[a] = compute_caps_hash([gajim.gajim_identity],