summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2019-08-24 14:17:38 +0200
committermathieui <mathieui@mathieui.net>2019-08-24 14:17:38 +0200
commita157a21c87446cd99021e94ebda050d7de94455c (patch)
tree49b7cec7d2be4dd9ac09d8ffa13acf6f57cb59a5
parentea5977da4ae11e19064c4acb8b9ff2be199d6ada (diff)
downloadpoezio-a157a21c87446cd99021e94ebda050d7de94455c.tar.gz
poezio-a157a21c87446cd99021e94ebda050d7de94455c.tar.bz2
poezio-a157a21c87446cd99021e94ebda050d7de94455c.tar.xz
poezio-a157a21c87446cd99021e94ebda050d7de94455c.zip
Always feed a JID to open_conversation_window
-rw-r--r--poezio/core/commands.py2
-rw-r--r--poezio/core/core.py6
2 files changed, 4 insertions, 4 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index eff50a29..5e3efb1d 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -1040,7 +1040,7 @@ class CommandCore:
jid.full, False, fallback_barejid=False)
muc = self.core.tabs.by_name_and_class(jid.bare, tabs.MucTab)
if not tab and not muc:
- tab = self.core.open_conversation_window(jid.full, focus=True)
+ tab = self.core.open_conversation_window(JID(jid.full), focus=True)
elif muc:
if jid.resource:
tab = self.core.tabs.by_name_and_class(jid.full,
diff --git a/poezio/core/core.py b/poezio/core/core.py
index 55b04221..b67ace6a 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -639,13 +639,13 @@ class Core:
"""
if isinstance(roster_row, Contact):
if not self.get_conversation_by_jid(roster_row.bare_jid, False):
- self.open_conversation_window(roster_row.bare_jid)
+ self.open_conversation_window(JID(roster_row.bare_jid))
else:
self.focus_tab_named(roster_row.bare_jid)
if isinstance(roster_row, Resource):
if not self.get_conversation_by_jid(
roster_row.jid, False, fallback_barejid=False):
- self.open_conversation_window(roster_row.jid)
+ self.open_conversation_window(JID(roster_row.jid))
else:
self.focus_tab_named(roster_row.jid)
self.refresh_window()
@@ -1038,7 +1038,7 @@ class Core:
# nothing was found (and we lock it to the resource
# later)
conversation = self.open_conversation_window(
- jid.bare, False)
+ JID(jid.bare), False)
else:
conversation = None
return conversation