aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--plugins/mod_mam/mamprefs.lib.lua3
-rw-r--r--plugins/mod_mam/mod_mam.lua2
2 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_mam/mamprefs.lib.lua b/plugins/mod_mam/mamprefs.lib.lua
index 98e74bd6..f9b4b129 100644
--- a/plugins/mod_mam/mamprefs.lib.lua
+++ b/plugins/mod_mam/mamprefs.lib.lua
@@ -16,7 +16,8 @@ do
end
local sessions = hosts[module.host].sessions;
-local prefs = module:open_store("archive2_prefs");
+local archive_store = module:get_option_string("archive_store", "archive");
+local prefs = module:open_store(archive_store .. "_prefs");
local function get_prefs(user)
local user_sessions = sessions[user];
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 898b81c8..cff542bb 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -34,7 +34,7 @@ if global_default_policy ~= "roster" then
end
local strip_tags = module:get_option_set("dont_archive_namespaces", { "http://jabber.org/protocol/chatstates" });
-local archive_store = "archive2";
+local archive_store = module:get_option_string("archive_store", "archive");
local archive = assert(module:open_store(archive_store, "archive"));
if archive.name == "null" or not archive.find then