quick_frontend (quick_chat): QuickChat._get_nick returns "" instead of None for message from the MUC
This commit is contained in:
parent
3595d2656b
commit
042e19b812
1 changed files with 2 additions and 2 deletions
|
|
@ -160,9 +160,9 @@ class QuickChat(quick_widgets.QuickWidget):
|
||||||
"""Return nick of this entity when possible"""
|
"""Return nick of this entity when possible"""
|
||||||
contact_list = self.host.contact_lists[self.profile]
|
contact_list = self.host.contact_lists[self.profile]
|
||||||
if self.type == C.CHAT_GROUP or entity in contact_list.getSpecialExtras(C.CONTACT_SPECIAL_GROUP):
|
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:
|
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
|
return entity.node or entity
|
||||||
|
|
||||||
def onPrivateCreated(self, widget):
|
def onPrivateCreated(self, widget):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue