diff options
author | Kim Alvefur <zash@zash.se> | 2020-04-21 01:29:58 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2020-04-21 01:29:58 +0200 |
commit | 78668f1be3eb2e0c8301995a65fd7aa87e67aefa (patch) | |
tree | 9000c15bf06e16e19d33f07abb3b374a6e1071c4 | |
parent | c8db26be662085caef941923286bdcce9f600950 (diff) | |
download | prosody-78668f1be3eb2e0c8301995a65fd7aa87e67aefa.tar.gz prosody-78668f1be3eb2e0c8301995a65fd7aa87e67aefa.zip |
mod_mam: Check sender of error instead of receiver
The intent is to capture errors to stanzas sent by the local user, so
that they can see why a message failed to be delivered even if the error
came after they went offline.
-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 6e522d73..db0e7f8d 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -266,6 +266,9 @@ end local function should_store(stanza) --> boolean, reason: string local st_type = stanza.attr.type or "normal"; local st_to_full = (stanza.attr.to or ""):find("/"); + if st_type == "error" then + st_to_full = (stanza.attr.from or ""):find("/"); + end if st_type == "headline" then -- Headline messages are ephemeral by definition |