Discover PublishOptions also if PubSub is not discovered

PEP supports a subset of PubSub and can also support publish options
This commit is contained in:
Philipp Hörist 2017-10-13 22:54:47 +02:00
parent ac281533f5
commit dd4a80054d
1 changed files with 6 additions and 6 deletions

View File

@ -1930,12 +1930,12 @@ class Connection(CommonConnection, ConnectionHandlers):
self.register_supported = True
if nbxmpp.NS_PUBSUB in obj.features:
self.pubsub_supported = True
if nbxmpp.NS_PUBSUB_PUBLISH_OPTIONS in obj.features:
self.pubsub_publish_options_supported = True
else:
# Remove stored bookmarks accessible to everyone.
self.send_pb_purge(our_jid, 'storage:bookmarks')
self.send_pb_delete(our_jid, 'storage:bookmarks')
if nbxmpp.NS_PUBSUB_PUBLISH_OPTIONS in obj.features:
self.pubsub_publish_options_supported = True
else:
# Remove stored bookmarks accessible to everyone.
self.send_pb_purge(our_jid, 'storage:bookmarks')
self.send_pb_delete(our_jid, 'storage:bookmarks')
if nbxmpp.NS_BLOCKING in obj.features:
self.blocking_supported = True
if nbxmpp.NS_ADDRESS in obj.features: