# HG changeset patch # User Goffi # Date 1513037245 -3600 # Node ID a9c092bf4ee92ace44148850321f603fe9edfd92 # Parent 4841ad6a5db4ad362586354772558b5ea577567a plugin XEP-0060: added an config option to set pubsub service "pubsub_service" can now be used in [DEFAULT] section. If not found or invalid, first pubsub service found will be used fix 216 diff -r 4841ad6a5db4 -r a9c092bf4ee9 src/plugins/plugin_xep_0060.py --- a/src/plugins/plugin_xep_0060.py Tue Dec 12 00:12:44 2017 +0100 +++ b/src/plugins/plugin_xep_0060.py Tue Dec 12 01:07:25 2017 +0100 @@ -121,7 +121,11 @@ @defer.inlineCallbacks def profileConnected(self, client): client.pubsub_watching = set() - client.pubsub_service = yield self.host.findServiceEntity(client, "pubsub", "service") + try: + client.pubsub_service = jid.JID(self.host.memory.getConfig('', 'pubsub_service')) + except RuntimeError: + log.info(_(u"Can't retrieve pubsub_service from conf, we'll use first one that we find")) + client.pubsub_service = yield self.host.findServiceEntity(client, "pubsub", "service") def getFeatures(self, profile): try: