From be9f447099cbe8d0d3aef268c9aa3fe1e871921b Mon Sep 17 00:00:00 2001 From: mathieui Date: Mon, 29 Jun 2015 23:49:11 +0200 Subject: Make /otr end terminate all encrypted conversations with this bare JID --- plugins/otr.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/otr.py b/plugins/otr.py index cef6d7d4..c9fc50d9 100644 --- a/plugins/otr.py +++ b/plugins/otr.py @@ -822,10 +822,11 @@ class Plugin(BasePlugin): if action == 'end': # close the session context = self.get_context(name) context.disconnect() - if isinstance(tab, DynamicConversationTab) and not tab.locked_resource: + if isinstance(tab, DynamicConversationTab): ctx = self.find_encrypted_context_with_matching(safeJID(name).bare) - if ctx is not None: + while ctx is not None: ctx.disconnect() + ctx = self.find_encrypted_context_with_matching(safeJID(name).bare) elif action == 'start' or action == 'refresh': self.otr_start(tab, name, format_dict) elif action == 'ourfpr': -- cgit v1.2.3