diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-22 18:47:06 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-22 18:47:06 +0200 |
commit | 8c1161cf773fa9eb5371e2bffdb054b97a71dad1 (patch) | |
tree | 3ae35dbea1b02d5ce7eab27d6e926f27967154e7 /plugins | |
parent | b0dbacb69cac71c39088328f740b7e4b59831b81 (diff) | |
download | prosody-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')
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 3 |
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 |