aboutsummaryrefslogtreecommitdiff
path: root/src/mod_mam.erl
diff options
context:
space:
mode:
authorHolger Weiss <holger@zedat.fu-berlin.de>2017-11-30 22:15:33 +0100
committerHolger Weiss <holger@zedat.fu-berlin.de>2017-11-30 22:15:33 +0100
commit0b1a6d7e79f9431346dbbf9c651cdbae9ff6f0f9 (patch)
tree1e7f6c8123f227cefb48100ccf59fa8409d71bae /src/mod_mam.erl
parentWindows does not have /tmp, fallback to /home/chris/conf (diff)
mod_mam: Never store MUC messages in user archives
Even if a groupchat message is tagged with a <store/> hint, don't store it in a user archive. The hint should only be honored by the MUC archive.
Diffstat (limited to 'src/mod_mam.erl')
-rw-r--r--src/mod_mam.erl4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mod_mam.erl b/src/mod_mam.erl
index eb839ea19..2f1a16afa 100644
--- a/src/mod_mam.erl
+++ b/src/mod_mam.erl
@@ -577,6 +577,8 @@ process_iq(LServer, #iq{from = #jid{luser = LUser}, lang = Lang,
-spec should_archive(message(), binary()) -> boolean().
should_archive(#message{type = error}, _LServer) ->
false;
+should_archive(#message{type = groupchat}, _LServer) ->
+ false;
should_archive(#message{meta = #{from_offline := true}}, _LServer) ->
false;
should_archive(#message{body = Body, subject = Subject,
@@ -590,7 +592,7 @@ should_archive(#message{body = Body, subject = Subject,
true;
no_store ->
false;
- none when Type == groupchat; Type == headline ->
+ none when Type == headline ->
false;
none ->
xmpp:get_text(Body) /= <<>> orelse