Comparison

plugins/mod_mam/mod_mam.lua @ 7850:10d91860172f

mod_mam: Change store name to "archive" but make it configurable for people who have data in "archive2"
author Kim Alvefur <zash@zash.se>
date Wed, 11 Jan 2017 13:08:50 +0100
parent 7849:93a068ef4b2c
child 7851:80ee0d9cd56f
comparison
equal deleted inserted replaced
7849:93a068ef4b2c 7850:10d91860172f
32 if global_default_policy ~= "roster" then 32 if global_default_policy ~= "roster" then
33 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy); 33 global_default_policy = module:get_option_boolean("default_archive_policy", global_default_policy);
34 end 34 end
35 local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" }); 35 local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" });
36 36
37 local archive_store = "archive2"; 37 local archive_store = module:get_option_string("archive_store", "archive");
38 local archive = assert(module:open_store(archive_store, "archive")); 38 local archive = assert(module:open_store(archive_store, "archive"));
39 39
40 if archive.name == "null" or not archive.find then 40 if archive.name == "null" or not archive.find then
41 if not archive.find then 41 if not archive.find then
42 module:log("debug", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API"); 42 module:log("debug", "Attempt to open archive storage returned a valid driver but it does not seem to implement the storage API");