Commit 5c9dd440 authored by mathieui's avatar mathieui

Add jid info to the unlock messages

parent fba511e2
......@@ -3459,7 +3459,7 @@ class Core(object):
contact = roster[jid.bare]
tab = self.get_conversation_by_jid(jid, create=False)
if isinstance(tab, tabs.DynamicConversationTab) and tab.get_dest_jid() != jid.full:
tab.unlock()
tab.unlock(from_=jid.full)
if contact is None:
return
roster.modified()
......
......@@ -393,14 +393,17 @@ class DynamicConversationTab(ConversationTab):
self.unlock()
self.refresh_info_header()
def unlock(self):
def unlock(self, from_=None):
"""
Unlock the tab from a resource. It is now “associated” with the bare
jid.
"""
if self.locked_resource != None:
self.locked_resource = None
self.add_message(_('Conversation unlocked.'), typ=0)
if from_:
self.add_message(_('Conversation unlocked (received activity from %s).') % from_, typ=0)
else:
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