# HG changeset patch # User Goffi # Date 1510732547 -3600 # Node ID c6d859df4b2747d04cf7599e7311d32e9f9540eb # Parent a9fac72825a253d4577dd0815d60b53bb179fd30 plugin XEP-0060: use new findServiceEntity to get default pubsub service diff -r a9fac72825a2 -r c6d859df4b27 src/plugins/plugin_xep_0060.py --- a/src/plugins/plugin_xep_0060.py Wed Nov 15 08:54:32 2017 +0100 +++ b/src/plugins/plugin_xep_0060.py Wed Nov 15 08:55:47 2017 +0100 @@ -113,12 +113,7 @@ @defer.inlineCallbacks def profileConnected(self, client): - 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() - else: - client.pubsub_service = None + client.pubsub_service = yield self.host.findServiceEntity(client, "pubsub", "service") def getFeatures(self, profile): try: