From d8070318ff33eaaf13ba94aae99f93c9d577b55f Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Sun, 27 Jul 2008 21:42:34 +0000 Subject: [PATCH] don't autonegotiate if gpg is already active --- src/chat_control.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 5cb97d3d2..5b6152be8 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -2264,10 +2264,13 @@ class ChatControl(ChatControlBase): self.account, 'autonegotiate_esessions') and \ gajim.config.get_per('contacts', self.contact.jid, 'autonegotiate_esessions') + want_e2e = not e2e_is_active and not self.gpg_is_active \ + and e2e_pref + # XXX: Once we have fallback to disco, remove # notexistant check - if not e2e_is_active and e2e_pref and \ - not self.no_autonegotiation and gajim.HAVE_PYCRYPTO \ + if want_e2e and not self.no_autonegotiation \ + and gajim.HAVE_PYCRYPTO \ and gajim.capscache.is_supported(self.contact, NS_ESESSION) and not gajim.capscache.is_supported( self.contact, 'notexistant'):