Commit d1a9a698 authored by Yann Leboulanger's avatar Yann Leboulanger

EncryptedSession cannot be an ArchivingSession

parent 47ff962e
......@@ -2060,7 +2060,8 @@ class ChatControl(ChatControlBase):
Print esession settings to textview
archiving = bool(self.session) and self.session.archiving
archiving = bool(self.session) and isinstance(self.session,
ArchivingStanzaSession) and self.session.archiving
if archiving:
msg = _('This session WILL be archived on server')
......@@ -287,7 +287,7 @@ class ArchivingStanzaSession(StanzaSession):
class EncryptedStanzaSession(ArchivingStanzaSession):
class EncryptedStanzaSession(StanzaSession):
An encrypted stanza negotiation has several states. They arerepresented as
the following values in the 'status' attribute of the session object:
......@@ -313,7 +313,7 @@ class EncryptedStanzaSession(ArchivingStanzaSession):
handle_session_negotiation method.
def __init__(self, conn, jid, thread_id, type_='chat'):
ArchivingStanzaSession.__init__(self, conn, jid, thread_id, type_='chat')
StanzaSession.__init__(self, conn, jid, thread_id, type_='chat')
self.xes = {} = {}
......@@ -166,11 +166,13 @@ class MessageControl:
crypto_changed = bool(session and isinstance(session,
EncryptedStanzaSession) and session.enable_encryption) != \
bool(oldsession and oldsession.enable_encryption)
bool(oldsession and isinstance(oldsession, EncryptedStanzaSession) and\
archiving_changed = bool(session and isinstance(session,
ArchivingStanzaSession) and session.archiving) != \
bool(oldsession and oldsession.archiving)
bool(oldsession and isinstance(oldsession, ArchivingStanzaSession) and\
if crypto_changed or archiving_changed:
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment