diff options
author | Holger Weiss <holger@zedat.fu-berlin.de> | 2017-11-30 22:15:33 +0100 |
---|---|---|
committer | Holger Weiss <holger@zedat.fu-berlin.de> | 2017-11-30 22:15:33 +0100 |
commit | 0b1a6d7e79f9431346dbbf9c651cdbae9ff6f0f9 (patch) | |
tree | 1e7f6c8123f227cefb48100ccf59fa8409d71bae /src | |
parent | Windows 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')
-rw-r--r-- | src/mod_mam.erl | 4 |
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 |