mirror of
https://github.com/bjc/prosody.git
synced 2025-04-03 21:27:38 +03:00
mod_mam: Load archiving preferes for offline users (fixes #1024)
This commit is contained in:
parent
26f7e8de2c
commit
5841c8c064
1 changed files with 4 additions and 2 deletions
|
@ -33,9 +33,11 @@ local prefs = module:open_store(archive_store .. "_prefs");
|
|||
local function get_prefs(user)
|
||||
local user_sessions = sessions[user];
|
||||
local user_prefs = user_sessions and user_sessions.archive_prefs
|
||||
if not user_prefs and user_sessions then
|
||||
if not user_prefs then
|
||||
user_prefs = prefs:get(user);
|
||||
user_sessions.archive_prefs = user_prefs;
|
||||
if user_sessions then
|
||||
user_sessions.archive_prefs = user_prefs;
|
||||
end
|
||||
end
|
||||
return user_prefs or { [false] = global_default_policy };
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue