Software /
code /
prosody
Diff
plugins/mod_mam/mamprefs.lib.lua @ 7979:a1e88642411d
mod_mam: Handle default_archive_policy option consistently
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 16 Mar 2017 21:01:45 +0100 |
parent | 7884:60d3b53a36f7 |
child | 8353:aa6497031924 |
line wrap: on
line diff
--- a/plugins/mod_mam/mamprefs.lib.lua Thu Mar 16 20:53:08 2017 +0100 +++ b/plugins/mod_mam/mamprefs.lib.lua Thu Mar 16 21:01:45 2017 +0100 @@ -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