print in chat control when other side de-activate esession.

This commit is contained in:
Yann Leboulanger 2011-12-03 13:11:05 +01:00
parent ced1285de9
commit be867b7843
2 changed files with 4 additions and 3 deletions

View File

@ -2380,8 +2380,9 @@ class ChatControl(ChatControlBase):
self._show_lock_image(e2e_is_active, 'E2E', e2e_is_active, self.session and \
self.session.is_loggable(), self.session and self.session.verified_identity)
def print_session_details(self):
if isinstance(self.session, EncryptedStanzaSession):
def print_session_details(self, old_session=None):
if isinstance(self.session, EncryptedStanzaSession) or \
(old_session and isinstance(old_session, EncryptedStanzaSession)):
self.print_esession_details()
elif isinstance(self.session, ArchivingStanzaSession):
self.print_archiving_session_details()

View File

@ -219,7 +219,7 @@ class MessageControl(object):
ArchivingStanzaSession) and oldsession.archiving)
if crypto_changed or archiving_changed:
self.print_session_details()
self.print_session_details(oldsession)
def remove_session(self, session):
if session != self.session: