Get Pubsub bookmarks also if PEP is supported
This commit is contained in:
parent
149522dcee
commit
ac281533f5
1 changed files with 14 additions and 10 deletions
|
@ -2362,14 +2362,17 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
"""
|
"""
|
||||||
if not app.account_is_connected(self.name):
|
if not app.account_is_connected(self.name):
|
||||||
return
|
return
|
||||||
if self.pubsub_supported and self.pubsub_publish_options_supported \
|
|
||||||
and storage_type != 'xml':
|
if storage_type != 'xml':
|
||||||
|
pubsub = self.pubsub_supported or self.pep_supported
|
||||||
|
if pubsub and self.pubsub_publish_options_supported:
|
||||||
self.send_pb_retrieve('', 'storage:bookmarks')
|
self.send_pb_retrieve('', 'storage:bookmarks')
|
||||||
app.log('bookmarks').info('Request Bookmarks (PubSub)')
|
app.log('bookmarks').info('Request Bookmarks (PubSub)')
|
||||||
# some server (ejabberd) are so slow to answer that we request via XML
|
# some server (ejabberd) are so slow to answer that we
|
||||||
# if we don't get answer in the next 30 seconds
|
# request via XML if we don't get answer in the next 30 seconds
|
||||||
app.idlequeue.set_alarm(self._check_bookmarks_received, 30)
|
app.idlequeue.set_alarm(self._check_bookmarks_received, 30)
|
||||||
else:
|
return
|
||||||
|
|
||||||
self._request_bookmarks_xml()
|
self._request_bookmarks_xml()
|
||||||
|
|
||||||
def get_bookmarks_storage_node(self):
|
def get_bookmarks_storage_node(self):
|
||||||
|
@ -2423,7 +2426,8 @@ class Connection(CommonConnection, ConnectionHandlers):
|
||||||
storage_node = self.get_bookmarks_storage_node()
|
storage_node = self.get_bookmarks_storage_node()
|
||||||
|
|
||||||
if storage_type != 'xml':
|
if storage_type != 'xml':
|
||||||
if self.pubsub_supported and self.pubsub_publish_options_supported:
|
pubsub = self.pubsub_supported or self.pep_supported
|
||||||
|
if pubsub and self.pubsub_publish_options_supported:
|
||||||
self.send_pb_publish(
|
self.send_pb_publish(
|
||||||
'', 'storage:bookmarks', storage_node, 'current',
|
'', 'storage:bookmarks', storage_node, 'current',
|
||||||
options=self.get_bookmark_publish_options())
|
options=self.get_bookmark_publish_options())
|
||||||
|
|
Loading…
Add table
Reference in a new issue