# HG changeset patch # User Kim Alvefur # Date 1587596134 -7200 # Node ID 4db4bd8a782282c2ce22474f0def782c21c0a440 # Parent ff087f2d4cb600935d7c61a2bfb66a294e2892da mod_mam: Don't store any groupchat messages The intent was to not store MUC groupchat messages, which are sent from the MUC to local full JIDs, while allowing for potential future account based group chat. However, since this function handles messages in both directions and outgoing MUC messages are sent to the bare room JID, those were stored. diff -r ff087f2d4cb6 -r 4db4bd8a7822 plugins/mod_mam/mod_mam.lua --- a/plugins/mod_mam/mod_mam.lua Wed Apr 22 23:36:25 2020 +0200 +++ b/plugins/mod_mam/mod_mam.lua Thu Apr 23 00:55:34 2020 +0200 @@ -269,6 +269,8 @@ if st_type == "error" then st_to_full = (stanza.attr.from or ""):find("/"); end + -- FIXME pass direction of stanza and use that along with bare/full JID addressing + -- for more accurate MUC / type=groupchat check if st_type == "headline" then -- Headline messages are ephemeral by definition @@ -277,7 +279,7 @@ if st_type == "error" then return true, "bounce"; end - if st_type == "groupchat" and st_to_full then + if st_type == "groupchat" then -- MUC messages always go to the full JID, usually archived by the MUC return false, "groupchat"; end