aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_mam/mod_mam.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-22 18:50:30 +0200
committerKim Alvefur <zash@zash.se>2020-04-22 18:50:30 +0200
commit92150bd359689a2b3401ae9dcdc8ba51fbaf8e1f (patch)
tree5abceba883ea112f8dabf66f627e1fdd6b20e70d /plugins/mod_mam/mod_mam.lua
parent9bb75c85c478a5da62e697aa6006c570db15eae2 (diff)
downloadprosody-92150bd359689a2b3401ae9dcdc8ba51fbaf8e1f.tar.gz
prosody-92150bd359689a2b3401ae9dcdc8ba51fbaf8e1f.zip
mod_mam: Save delivery failures (thanks Ge0rG)
Makes it possible to learn of delivery failure even if it came bouncing back while you were offline.
Diffstat (limited to 'plugins/mod_mam/mod_mam.lua')
-rw-r--r--plugins/mod_mam/mod_mam.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua
index 06a20f4d..b74a92ea 100644
--- a/plugins/mod_mam/mod_mam.lua
+++ b/plugins/mod_mam/mod_mam.lua
@@ -274,6 +274,9 @@ local function should_store(stanza) --> boolean, reason: string
-- Headline messages are ephemeral by definition
return false, "headline";
end
+ if st_type == "error" then
+ return true, "bounce";
+ end
if st_type == "groupchat" and st_to_full then
-- MUC messages always go to the full JID, usually archived by the MUC
return false, "groupchat";