summaryrefslogtreecommitdiff
path: root/poezio/tabs/conversationtab.py
diff options
context:
space:
mode:
Diffstat (limited to 'poezio/tabs/conversationtab.py')
-rw-r--r--poezio/tabs/conversationtab.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/poezio/tabs/conversationtab.py b/poezio/tabs/conversationtab.py
index 23529a9b..d1ad608c 100644
--- a/poezio/tabs/conversationtab.py
+++ b/poezio/tabs/conversationtab.py
@@ -15,8 +15,6 @@ import curses
import logging
from typing import Dict, Callable
-from slixmpp import JID
-
from poezio.tabs.basetabs import OneToOneTab, Tab
from poezio import common
@@ -44,7 +42,7 @@ class ConversationTab(OneToOneTab):
additional_information = {} # type: Dict[str, Callable[[str], str]]
message_type = 'chat'
- def __init__(self, core, jid: JID):
+ def __init__(self, core, jid):
OneToOneTab.__init__(self, core, jid)
self.nick = None
self.nick_sent = False
@@ -402,10 +400,10 @@ class DynamicConversationTab(ConversationTab):
plugin_commands = {} # type: Dict[str, Command]
plugin_keys = {} # type: Dict[str, Callable]
- def __init__(self, core, jid: JID, resource=None):
+ def __init__(self, core, jid, resource=None):
self.locked_resource = None
+ self.name = safeJID(jid).bare
ConversationTab.__init__(self, core, jid)
- self.name.resource = None
self.info_header = windows.DynamicConversationInfoWin()
self.register_command(
'unlock', self.unlock_command, shortdesc='Deprecated, do nothing.')
@@ -472,8 +470,8 @@ class StaticConversationTab(ConversationTab):
plugin_commands = {} # type: Dict[str, Command]
plugin_keys = {} # type: Dict[str, Callable]
- def __init__(self, core, jid: JID):
- assert jid.resource
+ def __init__(self, core, jid):
+ assert (safeJID(jid).resource)
ConversationTab.__init__(self, core, jid)
self.info_header = windows.ConversationInfoWin()
self.resize()