25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

mod_mam: Fix "assume_mam_usage: if_enabled"

This commit is contained in:
Holger Weiss 2016-06-14 16:40:46 +02:00
parent 34cf693231
commit 26bce5dee3

View File

@ -316,7 +316,12 @@ message_is_archived(false, C2SState, Peer,
(never) -> never
end, never) of
if_enabled ->
get_prefs(LUser, LServer);
case get_prefs(LUser, LServer) of
#archive_prefs{} = P ->
{ok, P};
error ->
error
end;
on_request ->
Mod = gen_mod:db_mod(LServer, ?MODULE),
cache_tab:lookup(archive_prefs, {LUser, LServer},