Commit 53520317 authored by JC Brand's avatar JC Brand

Move `locked_muc_domain` and `muc_domain` to model

parent 9cb91512
......@@ -113,10 +113,8 @@ converse.plugins.add('converse-muc-views', {
_converse.api.settings.update({
'auto_list_rooms': false,
'cache_muc_messages': true,
'locked_muc_domain': false,
'locked_muc_nickname': false,
'muc_disable_slash_commands': false,
'muc_domain': undefined,
'muc_show_join_leave': true,
'muc_show_join_leave_status': true,
'roomconfig_whitelist': [],
......@@ -125,11 +123,6 @@ converse.plugins.add('converse-muc-views', {
}
});
if (_converse.locked_muc_domain && !_.isString(_converse.muc_domain)) {
throw new Error("Config Error: it makes no sense to set locked_muc_domain "+
"to true when muc_domain is not set");
}
function ___ (str) {
/* This is part of a hack to get gettext to scan strings to be
* translated. Strings we cannot send to the function above because
......
......@@ -112,17 +112,24 @@ converse.plugins.add('converse-muc', {
// Refer to docs/source/configuration.rst for explanations of these
// configuration settings.
_converse.api.settings.update({
allow_muc: true,
allow_muc_invitations: true,
auto_join_on_invite: false,
auto_join_rooms: [],
auto_register_muc_nickname: false,
muc_history_max_stanzas: undefined,
muc_instant_rooms: true,
muc_nickname_from_jid: false
'allow_muc': true,
'allow_muc_invitations': true,
'auto_join_on_invite': false,
'auto_join_rooms': [],
'auto_register_muc_nickname': false,
'locked_muc_domain': false,
'muc_domain': undefined,
'muc_history_max_stanzas': undefined,
'muc_instant_rooms': true,
'muc_nickname_from_jid': false
});
_converse.api.promises.add(['roomsAutoJoined']);
if (_converse.locked_muc_domain && !_.isString(_converse.muc_domain)) {
throw new Error("Config Error: it makes no sense to set locked_muc_domain "+
"to true when muc_domain is not set");
}
async function openRoom (jid) {
if (!u.isValidMUCJID(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