summaryrefslogtreecommitdiff
path: root/poezio/core
diff options
context:
space:
mode:
authorMaxime “pep” Buquet <pep@bouah.net>2019-04-08 11:38:29 +0100
committerMaxime “pep” Buquet <pep@bouah.net>2019-04-08 11:38:29 +0100
commit6ab49c188a6e5bb95773165f0bdbd672b41c8c81 (patch)
treed95da1a45124096cde6fb4fb073a0743a7de5b2c /poezio/core
parent0551867bfdb8dfa7dbd5964a15a1a950510e2c71 (diff)
downloadpoezio-6ab49c188a6e5bb95773165f0bdbd672b41c8c81.tar.gz
poezio-6ab49c188a6e5bb95773165f0bdbd672b41c8c81.tar.bz2
poezio-6ab49c188a6e5bb95773165f0bdbd672b41c8c81.tar.xz
poezio-6ab49c188a6e5bb95773165f0bdbd672b41c8c81.zip
Fix tab.name not being a string by calling the right property
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
Diffstat (limited to 'poezio/core')
-rw-r--r--poezio/core/commands.py2
-rw-r--r--poezio/core/core.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/poezio/core/commands.py b/poezio/core/commands.py
index 242b60a3..5b990091 100644
--- a/poezio/core/commands.py
+++ b/poezio/core/commands.py
@@ -335,7 +335,7 @@ class CommandCore:
if room.find('@') == -1 and not server_root:
tab = self.core.tabs.current_tab
if isinstance(tab, tabs.MucTab):
- if tab.name.find('@') != -1:
+ if tab.name.full.find('@') != -1:
domain = safeJID(tab.name).domain
room += '@%s' % domain
return (room, set_nick)
diff --git a/poezio/core/core.py b/poezio/core/core.py
index 2e0e0acb..5e3e912b 100644
--- a/poezio/core/core.py
+++ b/poezio/core/core.py
@@ -1277,7 +1277,7 @@ class Core:
if reason is None:
reason = '\x195}You left the room\x193}'
for tab in self.get_tabs(tabs.PrivateTab):
- if tab.name.startswith(room_name):
+ if tab.name.full.startswith(room_name):
tab.deactivate(reason=reason)
def enable_private_tabs(self, room_name: str,
@@ -1288,7 +1288,7 @@ class Core:
if reason is None:
reason = '\x195}You joined the room\x193}'
for tab in self.get_tabs(tabs.PrivateTab):
- if tab.name.startswith(room_name):
+ if tab.name.full.startswith(room_name):
tab.activate(reason=reason)
def on_user_changed_status_in_private(self, jid: JID, status: str) -> None: