Mercurial > libervia-backend
comparison src/memory/disco.py @ 2533:8d82a62fa098
core (disco), plugin XEP-0115: client use + capabilities hash improvment:
- modified a couple of method from memory to use client instead of profile
- XEP-0115: don't use unique hash for all clients anymore, as disco can be different between clients/components, and even between clients (different identity for instance).
hash is now generated per client on each new session.
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 24 Mar 2018 10:44:37 +0100 |
parents | 0046283a285d |
children |
comparison
equal
deleted
inserted
replaced
2532:772447ec070f | 2533:8d82a62fa098 |
---|---|
282 jid_ = jid.JID(client.jid.host) | 282 jid_ = jid.JID(client.jid.host) |
283 features = set(features) | 283 features = set(features) |
284 found_entities = set() | 284 found_entities = set() |
285 | 285 |
286 def infosCb(infos, entity): | 286 def infosCb(infos, entity): |
287 if entity is None: | |
288 log.warning(_(u'received an item without jid')) | |
289 return | |
287 if identity is not None and identity not in infos.identities: | 290 if identity is not None and identity not in infos.identities: |
288 return | 291 return |
289 if features.issubset(infos.features): | 292 if features.issubset(infos.features): |
290 found_entities.add(entity) | 293 found_entities.add(entity) |
291 | 294 |