aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
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
commitead815ece336974e216141f5549c4ea8083b0a63 (patch)
tree3ae35dbea1b02d5ce7eab27d6e926f27967154e7 /plugins
parent62b575639d000dcf172caa1cfd089ba12674c6dc (diff)
downloadprosody-ead815ece336974e216141f5549c4ea8083b0a63.tar.gz
prosody-ead815ece336974e216141f5549c4ea8083b0a63.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')
-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