summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/tabs.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/tabs.py b/src/tabs.py
index 82427715..f8923304 100644
--- a/src/tabs.py
+++ b/src/tabs.py
@@ -2500,7 +2500,11 @@ class ConversationTab(ChatTab):
def get_nick(self):
jid = JID(self.name)
- return roster.get_contact_by_jid(jid.bare).name or jid.user
+ contact = roster.get_contact_by_jid(jid.bare)
+ if contact:
+ return contact.name
+ else:
+ return jid.user
def on_input(self, key, raw):
if not raw and key in self.key_func: