From 2937b1672bd28c5c40c2a9a11599bdf9f7794ebf Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Tue, 31 Aug 2021 11:25:23 +0200 Subject: mod_mam: Explain behavior with absent mod_offline in a comment --- plugins/mod_mam/mod_mam.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'plugins/mod_mam/mod_mam.lua') diff --git a/plugins/mod_mam/mod_mam.lua b/plugins/mod_mam/mod_mam.lua index 92d45411..671967c3 100644 --- a/plugins/mod_mam/mod_mam.lua +++ b/plugins/mod_mam/mod_mam.lua @@ -474,6 +474,10 @@ end 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 -- cgit v1.2.3