plugin XEP-0060: listNodes should not use SatPubSubClient.getDiscoItems but self.host.getDiscoItems, cf. revs 1217 (318eab3f93f8) and 1259 (633fcd13a7dc)

This commit is contained in:
souliane 2014-11-24 17:20:51 +01:00
commit eaa0f83237

View file

@ -129,7 +129,7 @@ class XEP_0060(object):
@return: Deferred list[str]
"""
session_id = profile + '@found@' + service.userhost()
d = self.getDiscoItems(service, nodeIdentifier, profile_key=profile)
d = self.host.getDiscoItems(service, nodeIdentifier, profile_key=profile)
d.addCallback(lambda result: [item.getAttribute('node') for item in result.toElement().children if item.hasAttribute('node')])
return self._getDeferredNodeCache(session_id, d, profile)
@ -231,10 +231,6 @@ class XEP_0060(object):
profile, client = self.__getClientNProfile(profile_key, 'retrieve subscriptions')
return client.subscriptions(service, nodeIdentifier)
def getDiscoItems(self, service, nodeIdentifier='', profile_key=C.PROF_KEY_NONE):
profile, client = self.__getClientNProfile(profile_key, 'disco items')
return client.getDiscoItems(None, service, nodeIdentifier)
class SatPubSubClient(pubsub.PubSubClient):
implements(disco.IDisco)