diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-22 18:50:30 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-22 18:50:30 +0200 |
commit | 4dbf52830e170867320e83f742d69803651871cb (patch) | |
tree | 5abceba883ea112f8dabf66f627e1fdd6b20e70d /plugins/mod_mam/mod_mam.lua | |
parent | bb2a3804d1db20f02ae445991a3d92a596431c41 (diff) | |
download | prosody-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.lua | 3 |
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"; |