Handle empty diplay_name for message printing.
This commit is contained in:
parent
15f814bee8
commit
882a880e60
1 changed files with 2 additions and 1 deletions
|
@ -136,7 +136,8 @@ def sender_to_nick_and_color(room, sender):
|
|||
|
||||
if sender in room.users:
|
||||
user = room.users[sender]
|
||||
nick = user.display_name
|
||||
nick = (user.display_name if user.display_name
|
||||
else user.name)
|
||||
nick_color_name = user.nick_color
|
||||
else:
|
||||
nick = shorten_sender(sender)
|
||||
|
|
Loading…
Reference in a new issue