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:
Goffi 2016-07-24 17:47:09 +02:00
commit 57daef07a7

View file

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