# HG changeset patch # User Kim Alvefur # Date 1484136530 -3600 # Node ID 10d91860172f1ff6c12c36f013e6002b6eedbab4 # Parent 93a068ef4b2cea3d4fdd8078d000a1fe0ba09d56 mod_mam: Change store name to "archive" but make it configurable for people who have data in "archive2" diff -r 93a068ef4b2c -r 10d91860172f plugins/mod_mam/mamprefs.lib.lua --- a/plugins/mod_mam/mamprefs.lib.lua Mon Dec 19 08:44:56 2016 +0100 +++ b/plugins/mod_mam/mamprefs.lib.lua Wed Jan 11 13:08:50 2017 +0100 @@ -16,7 +16,8 @@ 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 -r 93a068ef4b2c -r 10d91860172f plugins/mod_mam/mod_mam.lua --- a/plugins/mod_mam/mod_mam.lua Mon Dec 19 08:44:56 2016 +0100 +++ b/plugins/mod_mam/mod_mam.lua Wed Jan 11 13:08:50 2017 +0100 @@ -34,7 +34,7 @@ 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