# HG changeset patch # User Kim Alvefur # Date 1587425398 -7200 # Node ID 08efb60faf67485367316da6e430bfc8e4b3f1eb # Parent 50f0a4d83731582a96b5be71adc497926511a412 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. diff -r 50f0a4d83731 -r 08efb60faf67 plugins/mod_mam/mod_mam.lua --- 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