diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-21 01:18:54 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-21 01:18:54 +0200 |
commit | 3dcfe11e54b8c4f936b701f9e57843fce39500f9 (patch) | |
tree | 59e05d459c4e2266f014e1926caa11c7e152458c /plugins/mod_mam | |
parent | 1056f4bb820479c00c4123f5fea818f45c47f98c (diff) | |
download | prosody-3dcfe11e54b8c4f936b701f9e57843fce39500f9.tar.gz prosody-3dcfe11e54b8c4f936b701f9e57843fce39500f9.zip |
mod_mam: Store XEP-0184 receipts and requests
Happy now Ge0rG?
Diffstat (limited to 'plugins/mod_mam')
-rw-r--r-- | plugins/mod_mam/mod_mam.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 385a0ad2..6e522d73 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -292,6 +292,11 @@ local function should_store(stanza) --> boolean, reason: string -- Since we can't know what an encrypted message contains, we assume it's important return true, "encrypted"; end + if stanza:get_child(nil, "urn:xmpp:receipts") then + -- If it's important enough to ask for a receipt then it's important enough to archive + -- and the same applies to the receipt + return true, "receipt"; + end if stanza:get_child("x", "jabber:x:conference") or stanza:find("{http://jabber.org/protocol/muc#user}x/invite") then return true, "invite"; |