reorder: Create ConversationTabs when they don't exist

Signed-off-by: Maxime Buquet's avatarMaxime “pep” Buquet <>
parent 00b91fe4
...@@ -175,9 +175,15 @@ class Plugin(BasePlugin): ...@@ -175,9 +175,15 @@ class Plugin(BasePlugin):
new_tabs.append(tab) new_tabs.append(tab)
old_tabs.remove(tab) old_tabs.remove(tab)
else: else:
self.api.information('Tab %s not found' % jid, 'Warning') self.api.information('Tab %s not found. Creating it' % jid, 'Warning')
if create_gaps: # TODO: Add support for MucTab. Requires nickname.
new_tabs.append(tabs.GapTab(self.core)) if cls in (tabs.DynamicConversationTab, tabs.StaticConversationTab):
new_tab = cls(self.core, jid)
self.api.information('Failed to create tab \'%s\'.' % jid, 'Error')
last = pos last = pos
for tab in old_tabs: for tab in old_tabs:
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