Commit fba511e2 authored by mathieui's avatar mathieui

Notify the user whenever the lock state of a dynamic conversation changes

parent 186803d9
......@@ -385,7 +385,9 @@ class DynamicConversationTab(ConversationTab):
Lock the tab to the resource.
"""
assert(resource)
self.locked_resource = resource
if resource != self.locked_resource:
self.locked_resource = resource
self.add_message(_('Conversation locked to %s/%s.') % (self.name, resource), typ=0)
def unlock_command(self, arg=None):
self.unlock()
......@@ -396,7 +398,9 @@ class DynamicConversationTab(ConversationTab):
Unlock the tab from a resource. It is now “associated” with the bare
jid.
"""
self.locked_resource = None
if self.locked_resource != None:
self.locked_resource = None
self.add_message(_('Conversation unlocked.'), typ=0)
def get_dest_jid(self):
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment