Software /
code /
prosody
Comparison
plugins/mod_mam/mamprefs.lib.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 | 7836:30fac9154fd4 |
child | 7851:80ee0d9cd56f |
comparison
equal
deleted
inserted
replaced
7849:93a068ef4b2c | 7850:10d91860172f |
---|---|
14 ["montague@montague.net"] = false, -- newer | 14 ["montague@montague.net"] = false, -- newer |
15 }; | 15 }; |
16 end | 16 end |
17 | 17 |
18 local sessions = hosts[module.host].sessions; | 18 local sessions = hosts[module.host].sessions; |
19 local prefs = module:open_store("archive2_prefs"); | 19 local archive_store = module:get_option_string("archive_store", "archive"); |
20 local prefs = module:open_store(archive_store .. "_prefs"); | |
20 | 21 |
21 local function get_prefs(user) | 22 local function get_prefs(user) |
22 local user_sessions = sessions[user]; | 23 local user_sessions = sessions[user]; |
23 local user_prefs = user_sessions and user_sessions.archive_prefs | 24 local user_prefs = user_sessions and user_sessions.archive_prefs |
24 if not user_prefs and user_sessions then | 25 if not user_prefs and user_sessions then |