fix ConversationTab's nicks when a contact has no name
This commit is contained in:
parent
4ace901909
commit
6de2673c8f
1 changed files with 2 additions and 2 deletions
|
@ -496,9 +496,9 @@ class Core(object):
|
||||||
# We create the conversation with the bare Jid if nothing was found
|
# We create the conversation with the bare Jid if nothing was found
|
||||||
conversation = self.open_conversation_window(jid.bare, False)
|
conversation = self.open_conversation_window(jid.bare, False)
|
||||||
if roster.get_contact_by_jid(jid.bare):
|
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:
|
else:
|
||||||
remote_nick = jid.full
|
remote_nick = jid.user
|
||||||
conversation.get_room().add_message(body, None, remote_nick, False, theme.COLOR_REMOTE_USER)
|
conversation.get_room().add_message(body, None, remote_nick, False, theme.COLOR_REMOTE_USER)
|
||||||
if self.current_tab() is not conversation:
|
if self.current_tab() is not conversation:
|
||||||
conversation.set_color_state(theme.COLOR_TAB_PRIVATE)
|
conversation.set_color_state(theme.COLOR_TAB_PRIVATE)
|
||||||
|
|
Loading…
Reference in a new issue