Comparison

plugins/mod_mam/mod_mam.lua @ 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
parent 11757:8141645e3865
child 11759:9925be5d3b8b
comparison
equal deleted inserted replaced
11757:8141645e3865 11758:c35b81575d5d
472 end 472 end
473 473
474 module:hook("pre-message/bare", strip_stanza_id_after_other_events, -1); 474 module:hook("pre-message/bare", strip_stanza_id_after_other_events, -1);
475 module:hook("pre-message/full", strip_stanza_id_after_other_events, -1); 475 module:hook("pre-message/full", strip_stanza_id_after_other_events, -1);
476 476
477 -- Catch messages not stored by mod_offline and mark them as stored if they
478 -- have been archived. This would generally only happen if mod_offline is
479 -- disabled. Otherwise the message would generate a delivery failure report,
480 -- which would not be accurate because it has been archived.
477 module:hook("message/offline/handle", function(event) 481 module:hook("message/offline/handle", function(event)
478 local stanza = event.stanza; 482 local stanza = event.stanza;
479 if stanza:get_child("stanza-id", xmlns_st_id) then 483 if stanza:get_child("stanza-id", xmlns_st_id) then
480 return true; 484 return true;
481 end 485 end