Mercurial > libervia-backend
diff src/plugins/plugin_xep_0060.py @ 2432:c6d859df4b27
plugin XEP-0060: use new findServiceEntity to get default pubsub service
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 15 Nov 2017 08:55:47 +0100 |
parents | e3edbccd26d7 |
children | b8ffb7f8056b |
line wrap: on
line diff
--- 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: