Software /
code /
prosody-modules
Diff
mod_mam/mod_mam.lua @ 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 |
parent | 1484:53a3a19d6093 |
child | 1678:9ee56cc1be2c |
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");