diff options
author | Kim Alvefur <zash@zash.se> | 2017-03-16 23:49:27 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-03-16 23:49:27 +0100 |
commit | 3601968ff85a10f18f1dba92360aac7efabe09ad (patch) | |
tree | 5d9e9dfec7020f862dc40a4b872556e3661b5327 /plugins/mod_mam | |
parent | 33f73b5b885da18cef1b983cd1a1fe6d287e0391 (diff) | |
parent | 4ce8edd6eb83eff68970077e9c3c99df19f5a955 (diff) | |
download | prosody-3601968ff85a10f18f1dba92360aac7efabe09ad.tar.gz prosody-3601968ff85a10f18f1dba92360aac7efabe09ad.zip |
Merge 0.10->trunk
Diffstat (limited to 'plugins/mod_mam')
-rw-r--r-- | plugins/mod_mam/mamprefs.lib.lua | 5 | ||||
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/plugins/mod_mam/mamprefs.lib.lua b/plugins/mod_mam/mamprefs.lib.lua index a561b9d5..72c08886 100644 --- a/plugins/mod_mam/mamprefs.lib.lua +++ b/plugins/mod_mam/mamprefs.lib.lua @@ -10,7 +10,10 @@ -- -- luacheck: ignore 122/prosody -local global_default_policy = module:get_option("default_archive_policy", true); +local global_default_policy = module:get_option_string("default_archive_policy", true); +if global_default_policy ~= "roster" then + global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); +end do -- luacheck: ignore 211/prefs_format diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 6e6d6383..7ea14502 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -35,7 +35,7 @@ local time_now = os.time; local m_min = math.min; local timestamp, timestamp_parse = require "util.datetime".datetime, require "util.datetime".parse; local default_max_items, max_max_items = 20, module:get_option_number("max_archive_query_results", 50); -local global_default_policy = module:get_option("default_archive_policy", true); +local global_default_policy = module:get_option_string("default_archive_policy", true); if global_default_policy ~= "roster" then global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); end |