Software /
code /
prosody-modules
Changeset
1587:3ac2b835c7b3
mod_mam: Make sure default_archive_policy is a boolean or "roster" (thanks souliane)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 18 Dec 2014 12:15:50 +0100 |
parents | 1586:b51e596c5a02 |
children | 1588:b5f9f1111a8b |
files | mod_mam/mod_mam.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mod_mam/mod_mam.lua Thu Dec 11 20:43:14 2014 +0100 +++ b/mod_mam/mod_mam.lua Thu Dec 18 12:15:50 2014 +0100 @@ -31,6 +31,9 @@ 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", false); +if global_default_policy ~= "roster" then + global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); +end local archive_store = "archive2"; local archive = module:open_store(archive_store, "archive");