]> granicus.if.org Git - ejabberd/commitdiff
Make mod_offline put msg ignored by mam in spool when mam storage is on
authorPaweł Chmielowski <pchmielowski@process-one.net>
Mon, 29 Apr 2019 14:30:45 +0000 (16:30 +0200)
committerPaweł Chmielowski <pchmielowski@process-one.net>
Mon, 29 Apr 2019 14:30:45 +0000 (16:30 +0200)
src/mod_offline.erl

index 6a9114a922693bb9f702f58772793590106f7598..4bacf1e90d567f80e695a5b14a1dfe510b762034 100644 (file)
@@ -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 ->