summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-05 01:14:30 +0000
committerlouiz@4325f9fc-e183-4c21-96ce-0ab188b42d13 <louiz@4325f9fc-e183-4c21-96ce-0ab188b42d13>2011-01-05 01:14:30 +0000
commit6de2673c8f2a124a844906d5cf26bec7e8643e00 (patch)
tree50a57bf28c47e8bd90a73f33fbc6346da4885015 /src
parent4ace90190902f0cd174a6c52343795e38a1f0df7 (diff)
downloadpoezio-6de2673c8f2a124a844906d5cf26bec7e8643e00.tar.gz
poezio-6de2673c8f2a124a844906d5cf26bec7e8643e00.tar.bz2
poezio-6de2673c8f2a124a844906d5cf26bec7e8643e00.tar.xz
poezio-6de2673c8f2a124a844906d5cf26bec7e8643e00.zip
fix ConversationTab's nicks when a contact has no name
Diffstat (limited to 'src')
-rw-r--r--src/core.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core.py b/src/core.py
index afc6376d..39d72b6c 100644
--- a/src/core.py
+++ b/src/core.py
@@ -496,9 +496,9 @@ class Core(object):
# We create the conversation with the bare Jid if nothing was found
conversation = self.open_conversation_window(jid.bare, False)
if roster.get_contact_by_jid(jid.bare):
- remote_nick = roster.get_contact_by_jid(jid.bare).get_name()
+ remote_nick = roster.get_contact_by_jid(jid.bare).get_name() or jid.user
else:
- remote_nick = jid.full
+ remote_nick = jid.user
conversation.get_room().add_message(body, None, remote_nick, False, theme.COLOR_REMOTE_USER)
if self.current_tab() is not conversation:
conversation.set_color_state(theme.COLOR_TAB_PRIVATE)