core: discoFindByFeatures now return only available resources

This commit is contained in:
Goffi 2018-05-25 10:52:01 +02:00
commit 4d4d594c60

View file

@ -655,6 +655,7 @@ class Memory(object):
@raise exceptions.UnknownEntityError: if entity is not in cache
@raise ValueError: entity_jid has a resource
"""
# FIXME: is there a need to keep cache data for resources which are not connected anymore?
if entity_jid.resource:
raise ValueError("getAllResources must be used with a bare jid (got {})".format(entity_jid))
profile_cache = self._getProfileCache(client)