Skip to content

Commit

Permalink
mod_mam: Fix "assume_mam_usage: if_enabled"
Browse files Browse the repository at this point in the history
  • Loading branch information
weiss committed Jun 14, 2016
1 parent 34cf693 commit 26bce5d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mod_mam.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down

0 comments on commit 26bce5d

Please sign in to comment.