diff --git a/CHANGES.md b/CHANGES.md index 2e67ab2eca..c3b9a0fa26 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,11 +6,13 @@ - #3033: Add the `muc_grouped_by_domain` option to display MUCs on the same domain in collapsible groups - #3300: Adding the maxWait option for `debouncedPruneHistory` - #3302: debounce MUC sidebar rendering +- #3305: New config option [muc_search_service](https://conversejs.org/docs/html/configuration.html#muc-search-service) - #3307: Fix inconsistency between browsers on textarea outlines - Add an occupants filter to the MUC sidebar - Fix: MUC occupant list does not sort itself on nicknames or roles changes - Fix: refresh the MUC sidebar when participants collection is sorted - Fix: room information not correctly refreshed when modifications are made by other users +- ### Breaking changes: diff --git a/docs/source/configuration.rst b/docs/source/configuration.rst index a5e93f3556..0ec211cb4b 100644 --- a/docs/source/configuration.rst +++ b/docs/source/configuration.rst @@ -1331,6 +1331,17 @@ automatically be "john". If now john@differentdomain.com tries to join the room, his nickname will be "john-2", and if john@somethingelse.com joins, then his nickname will be "john-3", and so forth. + +muc_search_service +------------------ + +* Default: ``'api@search.jabber.network'`` + +The JID of the service that should be used to search for MUCs for auto-complete +purposes. If this value is set to an empty string, no service will be used and +the auto-complete feature for adding MUCs will be disabled. + + muc_send_probes --------------- diff --git a/src/plugins/bookmark-views/modals/bookmark-list.js b/src/plugins/bookmark-views/modals/bookmark-list.js index 24cb264ba7..25fd97662f 100644 --- a/src/plugins/bookmark-views/modals/bookmark-list.js +++ b/src/plugins/bookmark-views/modals/bookmark-list.js @@ -6,11 +6,11 @@ import { api } from "@converse/headless"; export default class BookmarkListModal extends BaseModal { - renderModal () { // eslint-disable-line class-methods-use-this + renderModal () { return html``; } - getModalTitle () { // eslint-disable-line class-methods-use-this + getModalTitle () { return __('Bookmarks'); } } diff --git a/src/plugins/muc-views/index.js b/src/plugins/muc-views/index.js index e3bf951f5a..a1ea275ca8 100644 --- a/src/plugins/muc-views/index.js +++ b/src/plugins/muc-views/index.js @@ -52,6 +52,7 @@ converse.plugins.add('converse-muc-views', { 'muc_mention_autocomplete_show_avatar': true, 'muc_roomid_policy': null, 'muc_roomid_policy_hint': null, + 'muc_search_service': 'api@search.jabber.network', 'roomconfig_whitelist': [], 'show_retraction_warning': true, 'visible_toolbar_buttons': { diff --git a/src/plugins/muc-views/modals/templates/add-muc.js b/src/plugins/muc-views/modals/templates/add-muc.js index edfe153ab2..056ecb384e 100644 --- a/src/plugins/muc-views/modals/templates/add-muc.js +++ b/src/plugins/muc-views/modals/templates/add-muc.js @@ -35,6 +35,7 @@ export default (el) => { const label_room_address = muc_domain ? __('Groupchat name') : __('Groupchat address'); const muc_roomid_policy_error_msg = el.muc_roomid_policy_error_msg; const muc_roomid_policy_hint = api.settings.get('muc_roomid_policy_hint'); + const muc_search_service = api.settings.get('muc_search_service'); return html`
el.openChatRoom(ev)}>
@@ -42,16 +43,18 @@ export default (el) => { ${muc_roomid_policy_error_msg ? html`` : ''} - - + ${muc_search_service + ? html` + ` + : ''}
${muc_roomid_policy_hint ? html`
diff --git a/src/plugins/muc-views/search.js b/src/plugins/muc-views/search.js index 6f65dc30da..d84d72f63e 100644 --- a/src/plugins/muc-views/search.js +++ b/src/plugins/muc-views/search.js @@ -10,11 +10,12 @@ const rooms_cache = {}; * @param {string} query */ async function searchRooms (query) { + const muc_search_service = api.settings.get('muc_search_service'); const bare_jid = _converse.session.get('bare_jid'); const iq = $iq({ 'type': 'get', 'from': bare_jid, - 'to': 'api@search.jabber.network' + 'to': muc_search_service, }).c('search', { 'xmlns': Strophe.NS.MUCSEARCH }) .c('set', { 'xmlns': Strophe.NS.RSM }) .c('max').t(10).up().up()