From e9a96470ba5c61e9278bd6c968651b4b1ce05190 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 26 Mar 2017 00:58:21 +0100 Subject: Fix #3299 (/message is buggy) Make /message send the message to the room instead of failing. --- poezio/core/commands.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'poezio/core/commands.py') 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: -- cgit v1.2.3