From 8b1abeba54647524452f0a1b5f10a6dc299563d7 Mon Sep 17 00:00:00 2001 From: Brendan Taylor Date: Fri, 18 Jul 2008 04:01:07 +0000 Subject: [PATCH] fix disappearing crypto icon --- src/message_control.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/message_control.py b/src/message_control.py index 553902bc5..f12bbea73 100644 --- a/src/message_control.py +++ b/src/message_control.py @@ -142,8 +142,11 @@ class MessageControl: if self.resource: jid += '/' + self.resource - if oldsession.enable_encryption: - self.print_esession_details() + crypto_changed = bool(session and session.enable_encryption) != \ + bool(oldsession and oldsession.enable_encryption) + + if crypto_changed: + self.print_esession_details() def send_message(self, message, keyID = '', type = 'chat', chatstate = None, msg_id = None, composing_xep = None, resource = None,