comparison mod_mam/mod_mam.lua @ 2510:d81882aa0e1e

mod_mam: Make the store configurable to ease move to 0.10 version
author Kim Alvefur <zash@zash.se>
date Mon, 20 Feb 2017 00:07:59 +0100
parents 5941aac79f06
children 34a6ba5dfe4f
comparison
equal deleted inserted replaced
2509:34ec7bde5203 2510:d81882aa0e1e
35 local global_default_policy = module:get_option("default_archive_policy", true); 35 local global_default_policy = module:get_option("default_archive_policy", true);
36 if global_default_policy ~= "roster" then 36 if global_default_policy ~= "roster" then
37 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); 37 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy);
38 end 38 end
39 39
40 local archive_store = "archive2"; 40 local archive_store = module:get_option_string("archive_store", "archive2");
41 local archive = assert(module:open_store(archive_store, "archive")); 41 local archive = assert(module:open_store(archive_store, "archive"));
42 42
43 if archive.name == "null" or not archive.find then 43 if archive.name == "null" or not archive.find then
44 if not archive.find then 44 if not archive.find then
45 module:log("debug", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API"); 45 module:log("debug", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API");