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
commit4dbf52830e170867320e83f742d69803651871cb (patch)
tree5abceba883ea112f8dabf66f627e1fdd6b20e70d /plugins/mod_mam/mod_mam.lua
parentbb2a3804d1db20f02ae445991a3d92a596431c41 (diff)
downloadprosody-4dbf52830e170867320e83f742d69803651871cb.tar.gz
prosody-4dbf52830e170867320e83f742d69803651871cb.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";