Software /
code /
prosody
Changeset
11758:c35b81575d5d
mod_mam: Explain behavior with absent mod_offline in a comment
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 31 Aug 2021 11:25:23 +0200 |
parents | 11757:8141645e3865 |
children | 11759:9925be5d3b8b |
files | plugins/mod_mam/mod_mam.lua |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua Thu Jun 25 18:01:38 2020 +0200 +++ b/plugins/mod_mam/mod_mam.lua Tue Aug 31 11:25:23 2021 +0200 @@ -474,6 +474,10 @@ module:hook("pre-message/bare", strip_stanza_id_after_other_events, -1); module:hook("pre-message/full", strip_stanza_id_after_other_events, -1); +-- Catch messages not stored by mod_offline and mark them as stored if they +-- have been archived. This would generally only happen if mod_offline is +-- disabled. Otherwise the message would generate a delivery failure report, +-- which would not be accurate because it has been archived. module:hook("message/offline/handle", function(event) local stanza = event.stanza; if stanza:get_child("stanza-id", xmlns_st_id) then