diff --git a/conversejs/builtin.ts b/conversejs/builtin.ts index 0a9dd8c2..6797500b 100644 --- a/conversejs/builtin.ts +++ b/conversejs/builtin.ts @@ -49,7 +49,6 @@ function initConversePlugins (peertubeEmbedded: boolean): void { converse.plugins.add('livechatSpecifics', livechatSpecificsPlugin) // Viewer mode (anonymous accounts, before they have chosen their nickname). - // This plugin will be blacklisted in initConverse if not necessary. converse.plugins.add('livechatViewerModePlugin', livechatViewerModePlugin) } window.initConversePlugins = initConversePlugins @@ -133,12 +132,10 @@ async function initConverse ( // params.muc_show_logs_before_join = true => displays muc history on top of nickname form. But it's not updated. } - try { - if (!(autoViewerMode && !isAuthenticated && !isRemoteWithNicknameSet)) { - params.blacklisted_plugins ??= [] - params.blacklisted_plugins.push('livechatViewerModePlugin') - } + // no viewer mode if authenticated. + params.livechat_enable_viewer_mode = autoViewerMode && !isAuthenticated && !isRemoteWithNicknameSet + try { if (window.reconnectConverse) { // this is set in the livechatSpecificsPlugin window.reconnectConverse(params) } else { diff --git a/conversejs/custom/templates/muc-bottom-panel.js b/conversejs/custom/templates/muc-bottom-panel.js index 2723b663..37beeb84 100644 --- a/conversejs/custom/templates/muc-bottom-panel.js +++ b/conversejs/custom/templates/muc-bottom-panel.js @@ -77,16 +77,16 @@ const tplSlowMode = (o) => { } export default (o) => { - if (api.settings.get('livechat_viewer_mode')) { + if (api.settings.get('livechat_enable_viewer_mode')) { const model = o.model const i18nNickname = __('Nickname') const i18nJoin = __('Enter groupchat') - const i18n_heading = __('Choose a nickname to enter') + const i18nHeading = __('Choose a nickname to enter') return html`