quick_frontend (quick_chat): QuickChat._get_nick returns "" instead of None for message from the MUC

This commit is contained in:
souliane 2015-07-14 16:49:29 +02:00
commit 042e19b812

View file

@ -160,9 +160,9 @@ class QuickChat(quick_widgets.QuickWidget):
"""Return nick of this entity when possible"""
contact_list = self.host.contact_lists[self.profile]
if self.type == C.CHAT_GROUP or entity in contact_list.getSpecialExtras(C.CONTACT_SPECIAL_GROUP):
return entity.resource
return entity.resource or ""
if entity.bare in contact_list:
return contact_list.getCache(entity,'nick') or contact_list.getCache(entity,'name') or entity.node or entity
return contact_list.getCache(entity, 'nick') or contact_list.getCache(entity, 'name') or entity.node or entity
return entity.node or entity
def onPrivateCreated(self, widget):