Add plugin settings to default settings.

So that they are retrievable via the API.
This commit is contained in:
JC Brand 2016-03-01 08:57:57 +00:00
parent 14c66ff755
commit 9cce0ff6ae
5 changed files with 5 additions and 0 deletions

View File

@ -172,6 +172,7 @@
var settings = {
show_controlbox_by_default: false,
};
_.extend(converse.default_settings, settings);
_.extend(converse, settings);
_.extend(converse, _.pick(converse.user_settings, Object.keys(settings)));

View File

@ -209,6 +209,7 @@
hide_muc_server: false,
muc_history_max_stanzas: undefined, // Takes an integer, limits the amount of messages to fetch from chat room's history
};
_.extend(converse.default_settings, settings);
_.extend(converse, settings);
_.extend(converse, _.pick(converse.user_settings, Object.keys(settings)));

View File

@ -488,6 +488,7 @@
cache_otr_key: false,
use_otr_by_default: false
};
_.extend(converse.default_settings, settings);
_.extend(converse, settings);
_.extend(converse, _.pick(converse.user_settings, Object.keys(settings)));

View File

@ -50,6 +50,7 @@
var settings = {
ping_interval: 180 //in seconds
};
_.extend(converse.default_settings, settings);
_.extend(converse, settings);
_.extend(converse, _.pick(converse.user_settings, Object.keys(settings)));

View File

@ -87,6 +87,7 @@
domain_placeholder: __(" e.g. conversejs.org"), // Placeholder text shown in the domain input on the registration form
providers_link: 'https://xmpp.net/directory.php', // Link to XMPP providers shown on registration page
};
_.extend(converse.default_settings, settings);
_.extend(converse, settings);
_.extend(converse, _.pick(converse.user_settings, Object.keys(settings)));