Software /
code /
prosody
Changeset
10751:4db4bd8a7822
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 23 Apr 2020 00:55:34 +0200 |
parents | 10750:ff087f2d4cb6 |
children | 10752:930f38939f1e |
files | plugins/mod_mam/mod_mam.lua |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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