Changeset

11757:8141645e3865

mod_mam: "Handle" messages that have been archived in the absense of mod_offline
author Kim Alvefur <zash@zash.se>
date Thu, 25 Jun 2020 18:01:38 +0200
parents 11756:a0e17b7c8b05
children 11758:c35b81575d5d
files plugins/mod_mam/mod_mam.lua
diffstat 1 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua	Mon Aug 30 20:19:15 2021 +0200
+++ b/plugins/mod_mam/mod_mam.lua	Thu Jun 25 18:01:38 2020 +0200
@@ -474,6 +474,13 @@
 module:hook("pre-message/bare", strip_stanza_id_after_other_events, -1);
 module:hook("pre-message/full", strip_stanza_id_after_other_events, -1);
 
+module:hook("message/offline/handle", function(event)
+	local stanza = event.stanza;
+	if stanza:get_child("stanza-id", xmlns_st_id) then
+		return true;
+	end
+end, -2);
+
 if cleanup_after ~= "never" then
 	local cleanup_storage = module:open_store("archive_cleanup");
 	local cleanup_map = module:open_store("archive_cleanup", "map");