diff --git a/src/headless/plugins/bookmarks/plugin.js b/src/headless/plugins/bookmarks/plugin.js index 0e567315aa..17388b27c1 100644 --- a/src/headless/plugins/bookmarks/plugin.js +++ b/src/headless/plugins/bookmarks/plugin.js @@ -27,16 +27,7 @@ converse.plugins.add('converse-bookmarks', { // New functions which don't exist yet can also be added. ChatRoom: { - getDisplayName() { - const { _converse, getDisplayName } = this.__super__; - const { bookmarks } = _converse.state; - const bookmark = this.get('bookmarked') ? bookmarks?.get(this.get('jid')) : null; - return bookmark?.get('name') || getDisplayName.apply(this, arguments); - }, - - /** - * @param {string} nick - */ + /** @param {string} nick */ getAndPersistNickname(nick) { nick = nick || getNicknameFromBookmark(this.get('jid')); return this.__super__.getAndPersistNickname.call(this, nick); diff --git a/src/headless/plugins/muc/muc.js b/src/headless/plugins/muc/muc.js index 4472da3507..ab2c68cea9 100644 --- a/src/headless/plugins/muc/muc.js +++ b/src/headless/plugins/muc/muc.js @@ -1235,14 +1235,20 @@ class MUC extends ModelWithMessages(ColorAwareModel(ChatBoxBase)) { */ async getDiscoInfoFields () { const fields = await api.disco.getFields(this.get('jid')); + const config = fields.reduce((config, f) => { const name = f.get('var'); + if (name === 'muc#roomconfig_roomname') { + config['roomname'] = f.get('value'); + } if (name?.startsWith('muc#roominfo_')) { config[name.replace('muc#roominfo_', '')] = f.get('value'); } return config; }, {}); + this.config.save(config); + if (config['roomname']) this.save({ name: config['roomname'] }); } /** diff --git a/src/plugins/muc-views/modals/templates/muc-details.js b/src/plugins/muc-views/modals/templates/muc-details.js index ff7d6ea8c5..ae51506d24 100644 --- a/src/plugins/muc-views/modals/templates/muc-details.js +++ b/src/plugins/muc-views/modals/templates/muc-details.js @@ -11,8 +11,8 @@ const subject = (model) => { const i18n_topic = __('Topic'); const i18n_topic_author = __('Topic author'); return html` -
${i18n_topic}:
${i18n_topic_author}: ${subject && subject.author}
+${i18n_topic}:
${i18n_topic_author}: ${subject && subject.author}
`; } @@ -65,13 +65,13 @@ export default (model) => { nonce=${model.vcard?.get('vcard_updated')} height="72" width="72"> -${i18n_name}: ${model.get('name')}
-${i18n_address}:
${i18n_name}: ${model.get('name')}
+${i18n_address}:
${i18n_desc}:
${i18n_desc}:
${i18n_online_users}: ${num_occupants}
-${i18n_features}: +
${i18n_online_users}: ${num_occupants}
+${i18n_features}: