negotiate esession only if enable_esessions is activated. Fixes #4738

This commit is contained in:
Yann Leboulanger 2009-01-30 16:48:15 +00:00
parent ac05e57aa7
commit d673e04935
1 changed files with 4 additions and 4 deletions

View File

@ -2409,10 +2409,10 @@ class ChatControl(ChatControlBase):
e2e_is_active = self.session and \
self.session.enable_encryption
e2e_pref = gajim.config.get_per('accounts',
self.account, 'autonegotiate_esessions') and \
gajim.config.get_per('contacts',
self.contact.jid, 'autonegotiate_esessions')
e2e_pref = gajim.config.get_per('accounts', self.account,
'enable_esessions') and gajim.config.get_per('accounts',
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