From e01968ef9153ead93b5e9a52d29e834fabf48d36 Mon Sep 17 00:00:00 2001 From: js Date: Tue, 15 Jul 2008 16:45:39 +0000 Subject: [PATCH] GPG is always authenticated as we use GPG's WoT. An idea: Currently, we don't send the message when the key has not enough trust. How about showing the unauthenticated icon then, but sending the message? --- src/chat_control.py | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/chat_control.py b/src/chat_control.py index 1c5c35dd7..894d4f9de 100644 --- a/src/chat_control.py +++ b/src/chat_control.py @@ -1130,20 +1130,26 @@ class ChatControl(ChatControlBase): # Enable encryption if needed e2e_is_active = self.session and self.session.enable_encryption self.gpg_is_active = False - gpg_pref = gajim.config.get_per('contacts', contact.jid, 'gpg_enabled') + gpg_pref = gajim.config.get_per('contacts', contact.jid, + 'gpg_enabled') # try GPG first - if not e2e_is_active and gpg_pref and gajim.config.get_per('accounts', self.account, 'keyid') and\ + if not e2e_is_active and gpg_pref and \ + gajim.config.get_per('accounts', self.account, 'keyid') and \ gajim.connections[self.account].USE_GPG: self.gpg_is_active = True gajim.encrypted_chats[self.account].append(contact.jid) msg = _('GPG encryption enabled') - ChatControlBase.print_conversation_line(self, msg, 'status', '', None) + ChatControlBase.print_conversation_line(self, msg, + 'status', '', None) if self.session: - self.session.loggable = gajim.config.get('log_encrypted_sessions') - self._show_lock_image(self.gpg_is_active, 'GPG', self.gpg_is_active, self.session and \ - self.session.is_loggable(), self.session and self.session.verified_identity) + self.session.loggable = gajim.config.get( + 'log_encrypted_sessions') + # GPG is always authenticated as we use GPG's WoT + self._show_lock_image(self.gpg_is_active, 'GPG', + self.gpg_is_active, + self.session and self.session.is_loggable(), True) # then try E2E # XXX: Once we have fallback to disco, remove notexistant check elif not e2e_is_active and \