From 9cce0ff6ae740530deb1ca59050e07cc212656cf Mon Sep 17 00:00:00 2001 From: JC Brand Date: Tue, 1 Mar 2016 08:57:57 +0000 Subject: [PATCH] Add plugin settings to default settings. So that they are retrievable via the API. --- src/converse-controlbox.js | 1 + src/converse-muc.js | 1 + src/converse-otr.js | 1 + src/converse-ping.js | 1 + src/converse-register.js | 1 + 5 files changed, 5 insertions(+) diff --git a/src/converse-controlbox.js b/src/converse-controlbox.js index 4593597f6..0a6dfe4e8 100644 --- a/src/converse-controlbox.js +++ b/src/converse-controlbox.js @@ -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))); diff --git a/src/converse-muc.js b/src/converse-muc.js index d4bdf5dbd..04870bffe 100755 --- a/src/converse-muc.js +++ b/src/converse-muc.js @@ -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))); diff --git a/src/converse-otr.js b/src/converse-otr.js index d8db7fdf2..57bc00413 100644 --- a/src/converse-otr.js +++ b/src/converse-otr.js @@ -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))); diff --git a/src/converse-ping.js b/src/converse-ping.js index 2d4c153d1..3bbab7bee 100644 --- a/src/converse-ping.js +++ b/src/converse-ping.js @@ -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))); diff --git a/src/converse-register.js b/src/converse-register.js index 3278d02f3..eabd31edd 100644 --- a/src/converse-register.js +++ b/src/converse-register.js @@ -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)));