From: Paweł Chmielowski Date: Mon, 29 Apr 2019 14:30:45 +0000 (+0200) Subject: Make mod_offline put msg ignored by mam in spool when mam storage is on X-Git-Tag: 19.05~65 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=17ff62d4af3260f991603a30ca4fb46d3b1df8ef;p=ejabberd Make mod_offline put msg ignored by mam in spool when mam storage is on --- diff --git a/src/mod_offline.erl b/src/mod_offline.erl index 6a9114a92..4bacf1e90 100644 --- a/src/mod_offline.erl +++ b/src/mod_offline.erl @@ -171,8 +171,9 @@ reload(Host, NewOpts, OldOpts) -> -spec store_offline_msg(#offline_msg{}) -> ok | {error, full | any()}. store_offline_msg(#offline_msg{us = {User, Server}, packet = Pkt} = Msg) -> - case (not xmpp:get_meta(Pkt, activity_marker, false)) andalso - use_mam_for_user(User, Server) of + case use_mam_for_user(User, Server) andalso + (not xmpp:get_meta(Pkt, activity_marker, false)) andalso + xmpp:get_meta(Pkt, mam_archived, false) of true -> case xmpp:get_meta(Pkt, first_from_queue, false) of true ->