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