changeset 4ee46c73b380 in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=4ee46c73b380 description: stop message archiving for encrypted sessions. Fixes #5792
diffstat:
src/common/message_archiving.py | 7 +++++++ src/common/stanza_session.py | 7 +++++++ 2 files changed, 14 insertions(+), 0 deletions(-)
diffs (48 lines):
diff -r 3bd6009e8e5a -r 4ee46c73b380 src/common/message_archiving.py --- a/src/common/message_archiving.py Sun Jun 27 21:50:00 2010 +0200 +++ b/src/common/message_archiving.py Sun Jun 27 22:31:55 2010 +0200 @@ -76,6 +76,13 @@ item.setAttr('jid', jid) self.connection.send(iq_)
+ def stop_archiving_session(self, thread_id): + iq_ = common.xmpp.Iq('set') + pref = iq_.setTag('pref', namespace=common.xmpp.NS_ARCHIVE) + session = pref.setTag('session', attrs={'thread': thread_id, + 'save': 'false', 'otr': 'concede'}) + self.connection.send(iq_) + def get_item_pref(self, jid): jid = common.xmpp.JID(jid) if unicode(jid) in self.items: diff -r 3bd6009e8e5a -r 4ee46c73b380 src/common/stanza_session.py --- a/src/common/stanza_session.py Sun Jun 27 21:50:00 2010 +0200 +++ b/src/common/stanza_session.py Sun Jun 27 22:31:55 2010 +0200 @@ -287,6 +287,9 @@ if self.control: self.control.print_archiving_session_details()
+ def stop_archiving_for_session(self): + self.conn.stop_archiving_session(self.thread_id) +
class EncryptedStanzaSession(ArchivingStanzaSession): """ @@ -1035,6 +1038,8 @@ if self.control: self.control.print_esession_details()
+ self.stop_archiving_for_session() + def final_steps_alice(self, form): srs = '' srses = secrets.secrets().retained_secrets(self.conn.name, @@ -1075,6 +1080,8 @@ if self.control: self.control.print_esession_details()
+ self.stop_archiving_for_session() + def do_retained_secret(self, k, old_srs): """ Calculate the new retained secret. determine if the user needs to check