Renegotiate if the remote end got disconnected and now got back online.
This commit is contained in:
parent
87d5904384
commit
83a317c042
|
@ -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)
|
||||
|
||||
|
|
10
src/gajim.py
10
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 \
|
||||
|
|
Loading…
Reference in New Issue