diff src/plugins/plugin_xep_0060.py @ 2148:a543eda2c923

core (memory/disco): getInfos now handle node + use client instead of profile in many methods
author Goffi <goffi@goffi.org>
date Sun, 12 Feb 2017 20:43:20 +0100
parents 33c8c4973743
children dd53d7a3219a
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0060.py	Sun Feb 12 19:23:34 2017 +0100
+++ b/src/plugins/plugin_xep_0060.py	Sun Feb 12 20:43:20 2017 +0100
@@ -100,7 +100,7 @@
 
     @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 @@
     #     @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