diff options
author | mathieui <mathieui@mathieui.net> | 2014-12-08 23:15:34 +0100 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2014-12-08 23:15:34 +0100 |
commit | 122edc539ec09f659a6218a3d032a4b421eb552c (patch) | |
tree | ce683a2a305d0fa723d6836681d04f0ab3a1c29d /src/core | |
parent | 99b9b1d81b16277c1ea57d2a89a43777fd8bcd90 (diff) | |
download | poezio-122edc539ec09f659a6218a3d032a4b421eb552c.tar.gz poezio-122edc539ec09f659a6218a3d032a4b421eb552c.tar.bz2 poezio-122edc539ec09f659a6218a3d032a4b421eb552c.tar.xz poezio-122edc539ec09f659a6218a3d032a4b421eb552c.zip |
Fix #2804 (handle privatetabs in /message)
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/commands.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/core/commands.py b/src/core/commands.py index 2777833b..d59829b9 100644 --- a/src/core/commands.py +++ b/src/core/commands.py @@ -984,8 +984,15 @@ def command_message(self, args): if not jid.user and not jid.domain and not jid.resource: return self.information('Invalid JID.', 'Error') tab = self.get_conversation_by_jid(jid.full, False, fallback_barejid=False) - if not tab: + muc = self.get_tab_by_name(jid.bare, typ=tabs.MucTab) + if not tab and not muc: tab = self.open_conversation_window(jid.full, focus=True) + elif muc: + tab = self.get_tab_by_name(jid.full, typ=tabs.PrivateTab) + if tab: + self.focus_tab_named(tab.name) + else: + tab = self.open_private_window(jid.bare, jid.resource) else: self.focus_tab_named(tab.name) if len(args) == 2: |