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 | c8db26be662085caef941923286bdcce9f600950 (patch) | |
tree | 59e05d459c4e2266f014e1926caa11c7e152458c /plugins/mod_mam | |
parent | e84179de9814eded7c4543848d871fd163ac31d2 (diff) | |
download | prosody-c8db26be662085caef941923286bdcce9f600950.tar.gz prosody-c8db26be662085caef941923286bdcce9f600950.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"; |