|
@@ -53797,7 +53797,8 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_6__["default"].plugins
|
|
'auto_list_rooms': false,
|
|
'auto_list_rooms': false,
|
|
'muc_disable_moderator_commands': false,
|
|
'muc_disable_moderator_commands': false,
|
|
'muc_domain': undefined,
|
|
'muc_domain': undefined,
|
|
- 'locked_muc_domain': undefined,
|
|
|
|
|
|
+ 'locked_muc_nickname': false,
|
|
|
|
+ 'locked_muc_domain': false,
|
|
'muc_show_join_leave': true,
|
|
'muc_show_join_leave': true,
|
|
'roomconfig_whitelist': [],
|
|
'roomconfig_whitelist': [],
|
|
'visible_toolbar_buttons': {
|
|
'visible_toolbar_buttons': {
|
|
@@ -54129,9 +54130,21 @@ _converse_headless_converse_core__WEBPACK_IMPORTED_MODULE_6__["default"].plugins
|
|
const data = new FormData(form);
|
|
const data = new FormData(form);
|
|
const jid = data.get('chatroom');
|
|
const jid = data.get('chatroom');
|
|
this.model.save('muc_domain', Strophe.getDomainFromJid(jid));
|
|
this.model.save('muc_domain', Strophe.getDomainFromJid(jid));
|
|
|
|
+ let nick;
|
|
|
|
+
|
|
|
|
+ if (_converse.locked_muc_nickname) {
|
|
|
|
+ nick = _converse.getDefaultMUCNickname();
|
|
|
|
+
|
|
|
|
+ if (!nick) {
|
|
|
|
+ throw new Error("Using locked_muc_nickname but no nickname found!");
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ nick = data.get('nickname').trim();
|
|
|
|
+ }
|
|
|
|
+
|
|
return {
|
|
return {
|
|
'jid': jid,
|
|
'jid': jid,
|
|
- 'nick': data.get('nickname').trim()
|
|
|
|
|
|
+ 'nick': nick
|
|
};
|
|
};
|
|
},
|
|
},
|
|
|
|
|
|
@@ -66641,8 +66654,10 @@ _converse_core__WEBPACK_IMPORTED_MODULE_3__["default"].plugins.add('converse-muc
|
|
_converse.router.route('converse/room?jid=:jid', openRoom);
|
|
_converse.router.route('converse/room?jid=:jid', openRoom);
|
|
|
|
|
|
_converse.getDefaultMUCNickname = function () {
|
|
_converse.getDefaultMUCNickname = function () {
|
|
|
|
+ // XXX: if anything changes here, update the docs for the
|
|
|
|
+ // locked_muc_nickname setting.
|
|
if (!_converse.xmppstatus) {
|
|
if (!_converse.xmppstatus) {
|
|
- throw new Error("Can't call _converse.getNickname before the statusInitialized has been fired.");
|
|
|
|
|
|
+ throw new Error("Can't call _converse.getDefaultMUCNickname before the statusInitialized has been fired.");
|
|
}
|
|
}
|
|
|
|
|
|
const nick = _converse.nickname || _converse.xmppstatus.vcard.get('nickname');
|
|
const nick = _converse.nickname || _converse.xmppstatus.vcard.get('nickname');
|
|
@@ -92534,20 +92549,25 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*global define
|
|
|
|
|
|
var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
|
|
var _ = {escape:__webpack_require__(/*! ./node_modules/lodash/escape.js */ "./node_modules/lodash/escape.js")};
|
|
module.exports = function(o) {
|
|
module.exports = function(o) {
|
|
-var __t, __p = '', __e = _.escape;
|
|
|
|
|
|
+var __t, __p = '', __e = _.escape, __j = Array.prototype.join;
|
|
|
|
+function print() { __p += __j.call(arguments, '') }
|
|
__p += '<!-- src/templates/add_chatroom_modal.html -->\n<div class="modal fade" id="add-chatroom-modal" tabindex="-1" role="dialog" aria-labelledby="add-chatroom-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title"\n id="add-chatroom-modal-label">' +
|
|
__p += '<!-- src/templates/add_chatroom_modal.html -->\n<div class="modal fade" id="add-chatroom-modal" tabindex="-1" role="dialog" aria-labelledby="add-chatroom-modal-label" aria-hidden="true">\n <div class="modal-dialog" role="document">\n <div class="modal-content">\n <div class="modal-header">\n <h5 class="modal-title"\n id="add-chatroom-modal-label">' +
|
|
__e(o.__('Enter a new Groupchat')) +
|
|
__e(o.__('Enter a new Groupchat')) +
|
|
'</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">×</span>\n </button>\n </div>\n <div class="modal-body">\n <form class="converse-form add-chatroom">\n <div class="form-group">\n <label for="chatroom">' +
|
|
'</h5>\n <button type="button" class="close" data-dismiss="modal" aria-label="Close">\n <span aria-hidden="true">×</span>\n </button>\n </div>\n <div class="modal-body">\n <form class="converse-form add-chatroom">\n <div class="form-group">\n <label for="chatroom">' +
|
|
__e(o.label_room_address) +
|
|
__e(o.label_room_address) +
|
|
':</label>\n <input type="text" required="required" name="chatroom" class="form-control" placeholder="' +
|
|
':</label>\n <input type="text" required="required" name="chatroom" class="form-control" placeholder="' +
|
|
__e(o.chatroom_placeholder) +
|
|
__e(o.chatroom_placeholder) +
|
|
-'"/>\n </div>\n <div class="form-group" >\n <label for="nickname">' +
|
|
|
|
|
|
+'"/>\n </div>\n ';
|
|
|
|
+ if (!o._converse.locked_muc_nickname) { ;
|
|
|
|
+__p += '\n <div class="form-group" >\n <label for="nickname">' +
|
|
__e(o.__('Nickname')) +
|
|
__e(o.__('Nickname')) +
|
|
':</label>\n <input type="text" pattern=".*\\S+.*" title="' +
|
|
':</label>\n <input type="text" pattern=".*\\S+.*" title="' +
|
|
__e(o.__('This field is required')) +
|
|
__e(o.__('This field is required')) +
|
|
'" required="required" name="nickname" value="' +
|
|
'" required="required" name="nickname" value="' +
|
|
__e(o.nick) +
|
|
__e(o.nick) +
|
|
-'" class="form-control"/>\n </div>\n <input type="submit" class="btn btn-primary" name="join" value="' +
|
|
|
|
|
|
+'" class="form-control"/>\n </div>\n ';
|
|
|
|
+ } ;
|
|
|
|
+__p += '\n <input type="submit" class="btn btn-primary" name="join" value="' +
|
|
__e(o.__('Join')) +
|
|
__e(o.__('Join')) +
|
|
'"/>\n </form>\n </div>\n </div>\n </div>\n</div>\n';
|
|
'"/>\n </form>\n </div>\n </div>\n </div>\n</div>\n';
|
|
return __p
|
|
return __p
|