Handle empty diplay_name for message printing.

This commit is contained in:
poljar (Damir Jelić) 2018-02-25 19:23:46 +01:00
parent 15f814bee8
commit 882a880e60

View file

@ -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)