stop saving bookmarks in pubsub if server doesn't support #publish-options. see #5787
This commit is contained in:
parent
cffdde6ad6
commit
4ab308d855
|
@ -1899,8 +1899,8 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
if bm.get('print_status', None):
|
if bm.get('print_status', None):
|
||||||
iq2.setTagData('print_status', bm['print_status'])
|
iq2.setTagData('print_status', bm['print_status'])
|
||||||
|
|
||||||
if self.pubsub_supported and storage_type != 'xml':
|
if self.pubsub_supported and self.pubsub_publish_options_supported and \
|
||||||
if self.pubsub_publish_options_supported:
|
storage_type != 'xml':
|
||||||
options = common.xmpp.Node(common.xmpp.NS_DATA + ' x',
|
options = common.xmpp.Node(common.xmpp.NS_DATA + ' x',
|
||||||
attrs={'type': 'submit'})
|
attrs={'type': 'submit'})
|
||||||
f = options.addChild('field', attrs={'var': 'FORM_TYPE',
|
f = options.addChild('field', attrs={'var': 'FORM_TYPE',
|
||||||
|
@ -1910,8 +1910,6 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
f.setTagData('value', 'true')
|
f.setTagData('value', 'true')
|
||||||
f = options.addChild('field', attrs={'var': 'pubsub#access_model'})
|
f = options.addChild('field', attrs={'var': 'pubsub#access_model'})
|
||||||
f.setTagData('value', 'whitelist')
|
f.setTagData('value', 'whitelist')
|
||||||
else:
|
|
||||||
options = None
|
|
||||||
self.send_pb_publish('', 'storage:bookmarks', iq, 'current',
|
self.send_pb_publish('', 'storage:bookmarks', iq, 'current',
|
||||||
options=options)
|
options=options)
|
||||||
if storage_type != 'pubsub':
|
if storage_type != 'pubsub':
|
||||||
|
|
Loading…
Reference in New Issue