From 3000b3f224e90bd7d78ed0cfed3daae992ae0993 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Thu, 16 Mar 2017 21:01:45 +0100 Subject: mod_mam: Handle default_archive_policy option consistently --- plugins/mod_mam/mamprefs.lib.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'plugins/mod_mam/mamprefs.lib.lua') 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 -- cgit v1.2.3