summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormathieui <mathieui@mathieui.net>2017-03-26 00:58:21 +0100
committermathieui <mathieui@mathieui.net>2017-03-26 00:58:21 +0100
commite9a96470ba5c61e9278bd6c968651b4b1ce05190 (patch)
tree010ab939c681ae32b753ed0a3e3f0f8e7dfc66f6
parentedd9b499e1813a7fdd27000630b732afe421b598 (diff)
downloadpoezio-e9a96470ba5c61e9278bd6c968651b4b1ce05190.tar.gz
poezio-e9a96470ba5c61e9278bd6c968651b4b1ce05190.tar.bz2
poezio-e9a96470ba5c61e9278bd6c968651b4b1ce05190.tar.xz
poezio-e9a96470ba5c61e9278bd6c968651b4b1ce05190.zip
Fix #3299 (/message <muc> is buggy)
Make /message <muc-bare-jid> send the message to the room instead of failing.
-rw-r--r--poezio/core/commands.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 8c960bad..c4f3bf87 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -949,11 +949,14 @@ class CommandCore:
if not tab and not muc:
tab = self.core.open_conversation_window(jid.full, focus=True)
elif muc:
- tab = self.core.get_tab_by_name(jid.full, typ=tabs.PrivateTab)
- if tab:
- self.core.focus_tab_named(tab.name)
+ if jid.resource:
+ tab = self.core.get_tab_by_name(jid.full, typ=tabs.PrivateTab)
+ if tab:
+ self.core.focus_tab_named(tab.name)
+ else:
+ tab = self.core.open_private_window(jid.bare, jid.resource)
else:
- tab = self.core.open_private_window(jid.bare, jid.resource)
+ tab = muc
else:
self.core.focus_tab_named(tab.name)
if len(args) == 2: