Don't unnecessarily check for #publish-options
This commit is contained in:
parent
cdd0382241
commit
a962fc0a24
1
dev.html
1
dev.html
@ -28,7 +28,6 @@
|
||||
// websocket_url: 'ws://chat.example.org:5280/xmpp-websocket',
|
||||
view_mode: 'fullscreen',
|
||||
archived_messages_page_size: '500',
|
||||
allow_public_bookmarks: true,
|
||||
notify_all_room_messages: [
|
||||
'discuss@conference.conversejs.org'
|
||||
],
|
||||
|
10
dist/converse.js
vendored
10
dist/converse.js
vendored
@ -49007,8 +49007,14 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_0__["default"].plugins
|
||||
});
|
||||
|
||||
_converse.checkBookmarksSupport = async function () {
|
||||
const args = await Promise.all([_converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid), _converse.api.disco.supports(Strophe.NS.PUBSUB + '#publish-options', _converse.bare_jid)]);
|
||||
return args[0] && (args[1].length || _converse.allow_public_bookmarks);
|
||||
const identity = await _converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid);
|
||||
|
||||
if (_converse.allow_public_bookmarks) {
|
||||
return !!identity;
|
||||
} else {
|
||||
const supported = await _converse.api.disco.supports(Strophe.NS.PUBSUB + '#publish-options', _converse.bare_jid);
|
||||
return !!supported.length;
|
||||
}
|
||||
};
|
||||
|
||||
const initBookmarks = async function initBookmarks() {
|
||||
|
@ -523,11 +523,13 @@ converse.plugins.add('converse-bookmarks', {
|
||||
});
|
||||
|
||||
_converse.checkBookmarksSupport = async function () {
|
||||
const args = await Promise.all([
|
||||
_converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid),
|
||||
_converse.api.disco.supports(Strophe.NS.PUBSUB+'#publish-options', _converse.bare_jid)
|
||||
]);
|
||||
return args[0] && (args[1].length || _converse.allow_public_bookmarks);
|
||||
const identity = await _converse.api.disco.getIdentity('pubsub', 'pep', _converse.bare_jid);
|
||||
if (_converse.allow_public_bookmarks) {
|
||||
return !!identity;
|
||||
} else {
|
||||
const supported = await _converse.api.disco.supports(Strophe.NS.PUBSUB+'#publish-options', _converse.bare_jid);
|
||||
return !!supported.length;
|
||||
}
|
||||
}
|
||||
|
||||
const initBookmarks = async function () {
|
||||
|
Loading…
Reference in New Issue
Block a user