aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_mam/mod_mam.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-22 18:47:06 +0200
committerKim Alvefur <zash@zash.se>2020-04-22 18:47:06 +0200
commit8c1161cf773fa9eb5371e2bffdb054b97a71dad1 (patch)
tree3ae35dbea1b02d5ce7eab27d6e926f27967154e7 /plugins/mod_mam/mod_mam.lua
parentb0dbacb69cac71c39088328f740b7e4b59831b81 (diff)
downloadprosody-8c1161cf773fa9eb5371e2bffdb054b97a71dad1.tar.gz
prosody-8c1161cf773fa9eb5371e2bffdb054b97a71dad1.zip
mod_mam: Respect no-store hint (thanks Ge0rG)
no-store is used in an example in XEP-0313, so obviously this is the preferred hint
Diffstat (limited to 'plugins/mod_mam/mod_mam.lua')
-rw-r--r--plugins/mod_mam/mod_mam.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 6d493131..7ac2a512 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -278,7 +278,8 @@ local function should_store(stanza) --> boolean, reason: string
-- MUC messages always go to the full JID, usually archived by the MUC
return false, "groupchat";
end
- if stanza:get_child("no-permanent-store", "urn:xmpp:hints") then
+ if stanza:get_child("no-store", "urn:xmpp:hints")
+ or stanza:get_child("no-permanent-store", "urn:xmpp:hints") then
return false, "hint";
end
if stanza:get_child("store", "urn:xmpp:hints") then