diff --git a/src/chat_control.py b/src/chat_control.py index 58c1af4dd..fb833cc75 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -2262,12 +2262,11 @@ class ChatControl(ChatControlBase): # notexistant check if not e2e_is_active and e2e_pref and \ not self.no_autonegotiation and gajim.HAVE_PYCRYPTO \ - and e2e_pref and gajim.capscache.is_supported( - self.contact, NS_ESESSION) and not \ - gajim.capscache.is_supported(self.contact, - 'notexistant'): - self.no_autonegotiation = True + and gajim.capscache.is_supported(self.contact, + NS_ESESSION) and not gajim.capscache.is_supported( + self.contact, 'notexistant'): self.begin_e2e_negotiation() + self.no_autonegotiation = True else: self.send_chatstate('active', self.contact) diff --git a/src/gajim.py b/src/gajim.py index 5ccc1f0fb..487bd3ddb 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -776,12 +776,20 @@ class Interface: # disable encryption, since if any messages are # lost they'll be not decryptable (note that - # this contradicts XEP-0201 - trying to get the + # this contradicts XEP-0201 - trying to get that # in the XEP, though) + # + # FIXME: This *REALLY* are TOO many leves of + # indentation! We even need to introduce + # a temp var here to make it somehow fit! if gajim.connections[account].sessions. \ has_key(ji): for sess in gajim.connections \ [account]. sessions[ji].values(): + ctrl = sess.control + if ctrl: + ctrl.no_autonegotiation\ + = False if sess.enable_encryption: sess.terminate_e2e() gajim.connections \