Make /otr end terminate all encrypted conversations with this bare JID
This commit is contained in:
parent
7c99b82642
commit
be9f447099
1 changed files with 3 additions and 2 deletions
|
@ -822,10 +822,11 @@ class Plugin(BasePlugin):
|
||||||
if action == 'end': # close the session
|
if action == 'end': # close the session
|
||||||
context = self.get_context(name)
|
context = self.get_context(name)
|
||||||
context.disconnect()
|
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)
|
ctx = self.find_encrypted_context_with_matching(safeJID(name).bare)
|
||||||
if ctx is not None:
|
while ctx is not None:
|
||||||
ctx.disconnect()
|
ctx.disconnect()
|
||||||
|
ctx = self.find_encrypted_context_with_matching(safeJID(name).bare)
|
||||||
elif action == 'start' or action == 'refresh':
|
elif action == 'start' or action == 'refresh':
|
||||||
self.otr_start(tab, name, format_dict)
|
self.otr_start(tab, name, format_dict)
|
||||||
elif action == 'ourfpr':
|
elif action == 'ourfpr':
|
||||||
|
|
Loading…
Reference in a new issue