quick_frontend, primitivus (contact_list): improved and simplified handling of "special" entities:
- special_extras has been removed
- specials handle all entities (bare + full) in a single set
This commit is contained in:
parent
7eb6d363d9
commit
57daef07a7
1 changed files with 31 additions and 61 deletions
|
|
@ -106,7 +106,7 @@ class Message(object):
|
|||
except KeyError:
|
||||
log.error(u"extra data is missing user nick for uid {}".format(self.uid))
|
||||
return ""
|
||||
if self.parent.type == C.CHAT_GROUP or entity in contact_list.getSpecialExtras(C.CONTACT_SPECIAL_GROUP):
|
||||
if self.parent.type == C.CHAT_GROUP or entity in contact_list.getSpecials(C.CONTACT_SPECIAL_GROUP):
|
||||
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue