From 055c4d2104c85339e931796ca9a0551fa26fb92d Mon Sep 17 00:00:00 2001 From: JC Brand Date: Thu, 8 Feb 2018 15:39:27 +0100 Subject: [PATCH] New config setting `allow_public_bookmarks` --- CHANGES.md | 4 ++++ docs/source/configuration.rst | 20 ++++++++++++++++++++ src/converse-bookmarks.js | 3 ++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index c5a90fd1d..2a6ccc89c 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -17,6 +17,10 @@ though they should be private._ ### API changes - New API method `_converse.disco.getIdentity` to check whether a JID has a given identity. +### New configuration settings +- New configuration setting [allow_public_bookmarks](https://conversejs.org/docs/html/configurations.html#allow-public-bookmarks) + + ## 3.3.2 (2018-01-29) ### Bugfixes diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index 4363deece..2aa99ba71 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -118,6 +118,8 @@ allow_bookmarks Enables/disables chatroom bookmarks functionality. This setting is only applicable if the ``converse-bookmarks`` plugin is loaded. +See also: `allow_public_bookmarks`_ + allow_chat_pending_contacts --------------------------- @@ -190,6 +192,24 @@ allow_otr Allow Off-the-record encryption of single-user chat messages. +allow_public_bookmarks +---------------------- + +* Default: ``false`` + +Some XMPP servers don't support private PEP/PubSub nodes, as required for +private bookmarks and outlined in `XEP-0223 `_. + +Even though Converse.js asks for the bookmarks to be kept private (via the +`` XML node), the server simply ignores the privacy settings +and publishes the node contents under the default privacy setting, which makes +the information available to all roster contacts. + +If your your XMPP server does not support `XEP-0223`'s ``#publish-options`` +feature and you don't mind that your room bookmarks are visible to all +contacts, then you can set this setting to ``true``. Otherwise you won't be +able to have any room bookmarks at all for an account on that XMPP server. + allow_registration ------------------ diff --git a/src/converse-bookmarks.js b/src/converse-bookmarks.js index 9b45c8a46..d5e143a32 100644 --- a/src/converse-bookmarks.js +++ b/src/converse-bookmarks.js @@ -218,6 +218,7 @@ // configuration settings. _converse.api.settings.update({ allow_bookmarks: true, + allow_public_bookmarks: false, hide_open_bookmarks: true }); // Promises exposed by this plugin @@ -540,7 +541,7 @@ const identity = args[0], options_support = args[1]; - if (_.isNil(identity) || !options_support.supported) { + if (_.isNil(identity) || (!options_support.supported && !_converse.allow_public_bookmarks)) { _converse.emit('bookmarksInitialized'); return; }