aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_mam/mamprefs.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-16 21:01:45 +0100
committerKim Alvefur <zash@zash.se>2017-03-16 21:01:45 +0100
commite9634beff0b1b88b232722a926bb5ef00af89f1f (patch)
tree171710201bf678bad2ed6a80ba0ef3a8d74dee0c /plugins/mod_mam/mamprefs.lib.lua
parent0655146d217181c4022989276762803fac3635d4 (diff)
downloadprosody-e9634beff0b1b88b232722a926bb5ef00af89f1f.tar.gz
prosody-e9634beff0b1b88b232722a926bb5ef00af89f1f.zip
mod_mam: Handle default_archive_policy option consistently
Diffstat (limited to 'plugins/mod_mam/mamprefs.lib.lua')
-rw-r--r--plugins/mod_mam/mamprefs.lib.lua5
1 files changed, 4 insertions, 1 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