Software /
code /
prosody
Changeset
10740:08efb60faf67
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.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 21 Apr 2020 01:29:58 +0200 |
parents | 10739:50f0a4d83731 |
children | 10741:27f1fcd85ccd |
files | plugins/mod_mam/mod_mam.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua Tue Apr 21 01:18:54 2020 +0200 +++ b/plugins/mod_mam/mod_mam.lua Tue Apr 21 01:29:58 2020 +0200 @@ -266,6 +266,9 @@ 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