Commit 616731b3 authored by JC Brand's avatar JC Brand

Don't show MUC domain if `locked_muc_domain` is set to `'hidden'`

parent fb89148b
......@@ -54467,6 +54467,7 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_6__["default"].plugins
/* Returns the heading HTML to be rendered.
*/
return templates_chatroom_head_html__WEBPACK_IMPORTED_MODULE_16___default()(_.extend(this.model.toJSON(), {
'_converse': _converse,
'Strophe': Strophe,
'info_close': __('Close and leave this groupchat'),
'info_configure': __('Configure this groupchat'),
......@@ -93495,12 +93496,20 @@ var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./no
module.exports = function(o) {
var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
function print() { __p += __j.call(arguments, '') }
__p += '<!-- src/templates/chatroom_head.html -->\n<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>\n<div class="chatbox-title">\n <div class="chat-title" title="' +
__p += '<!-- src/templates/chatroom_head.html -->\n<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>\n<div class="chatbox-title">\n <div class="chat-title" ';
if (o._converse.locked_muc_domain !== 'hidden') { ;
__p += ' title="' +
__e(o.jid) +
'">\n ';
'" ';
} ;
__p += ' >\n ';
if (o.name && o.name !== o.Strophe.getNodeFromJid(o.jid)) { ;
__p += '\n ' +
__e( o.name ) +
'\n ';
} else if (o._converse.locked_muc_domain === 'hidden') { ;
__p += '\n ' +
__e( o.Strophe.getNodeFromJid(o.jid) ) +
'\n ';
} else { ;
__p += '\n ' +
......@@ -882,10 +882,14 @@ locked_muc_domain
-----------------
* Default: ``false``
* Allowed values: ``false``, ``true``, ``'hidden'``
This setting allows you to restrict the multi-user chat (MUC) domain to only the value
By setting this value to something truthy, you restrict the multi-user chat (MUC) domain to only the value
specified in `muc_domain`_.
If the value is set to `'hidden'` (which is also truthy), then the MUC domain
will not be shown to users.
locked_muc_nickname
-------------------
......
......@@ -694,6 +694,7 @@ converse.plugins.add('converse-muc-views', {
*/
return tpl_chatroom_head(
_.extend(this.model.toJSON(), {
'_converse': _converse,
'Strophe': Strophe,
'info_close': __('Close and leave this groupchat'),
'info_configure': __('Configure this groupchat'),
......
<div class="chatbox-navback"><i class="fa fa-arrow-left"></i></div>
<div class="chatbox-title">
<div class="chat-title" title="{{{o.jid}}}">
<div class="chat-title" {[ if (o._converse.locked_muc_domain !== 'hidden') { ]} title="{{{o.jid}}}" {[ } ]} >
{[ if (o.name && o.name !== o.Strophe.getNodeFromJid(o.jid)) { ]}
{{{ o.name }}}
{[ } else if (o._converse.locked_muc_domain === 'hidden') { ]}
{{{ o.Strophe.getNodeFromJid(o.jid) }}}
{[ } else { ]}
{{{ o.Strophe.getNodeFromJid(o.jid) }}}@{{{ o.Strophe.getDomainFromJid(o.jid) }}}
{[ } ]}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment