core (memory/disco): getInfos now handle node + use client instead of profile in many methods

This commit is contained in:
Goffi 2017-02-12 20:43:20 +01:00
commit 3bc851abf2

View file

@ -100,7 +100,7 @@ class XEP_0060(object):
@defer.inlineCallbacks
def profileConnected(self, client):
pubsub_services = yield self.host.findServiceEntities("pubsub", "service", profile=client.profile)
pubsub_services = yield self.host.findServiceEntities(client, "pubsub", "service")
if pubsub_services:
# we use one of the found services as our default pubsub service
client.pubsub_service = pubsub_services.pop()
@ -228,7 +228,8 @@ class XEP_0060(object):
# @param profile (str): %(doc_profile)s
# @return: deferred which fire a list of nodes
# """
# d = self.host.getDiscoItems(service, nodeIdentifier, profile_key=profile)
# client = self.host.getClient(profile)
# d = self.host.getDiscoItems(client, service, nodeIdentifier)
# d.addCallback(lambda result: [item.getAttribute('node') for item in result.toElement().children if item.hasAttribute('node')])
# return d