aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-23 00:55:34 +0200
committerKim Alvefur <zash@zash.se>2020-04-23 00:55:34 +0200
commitba452d69231d6cbf4c2efb4f5e99df40d9a11ede (patch)
tree74e41e0fe036293c0ddbf10872a39fc6af6808c8 /plugins
parentd649e78d6d7e2977e6e60e26262eac1161631857 (diff)
downloadprosody-ba452d69231d6cbf4c2efb4f5e99df40d9a11ede.tar.gz
prosody-ba452d69231d6cbf4c2efb4f5e99df40d9a11ede.zip
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.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_mam/mod_mam.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index a9d389f5..65859afd 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -269,6 +269,8 @@ local function should_store(stanza) --> boolean, reason: string
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 @@ local function should_store(stanza) --> boolean, reason: string
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