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
This commit is contained in:
parent
49edd07cd0
commit
adca9c455d
1 changed files with 5 additions and 1 deletions
|
|
@ -121,7 +121,11 @@ class XEP_0060(object):
|
|||
@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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue