changeset 14005:b6d857435de1

mod_mam: Add archive-id to stanza metadata when archiving
author Matthew Wild <mwild1@gmail.com>
date Sat, 06 Dec 2025 17:30:05 +0000
parents 9991b6bd98ef
children 0d162ef4e0c1
files plugins/mod_mam/mod_mam.lua
diffstat 1 files changed, 1 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_mam/mod_mam.lua	Sat Dec 06 17:27:59 2025 +0000
+++ b/plugins/mod_mam/mod_mam.lua	Sat Dec 06 17:30:05 2025 +0000
@@ -461,6 +461,7 @@
 			local clone_for_other_handlers = st.clone(stanza);
 			local id = ok;
 			clone_for_other_handlers:tag("stanza-id", { xmlns = xmlns_st_id, by = store_user.."@"..host, id = id }):up();
+			clone_for_other_handlers:set_meta("archive-id", id);
 			event.stanza = clone_for_other_handlers;
 			schedule_cleanup(store_user);
 			module:fire_event("archive-message-added", { origin = origin, stanza = clone_for_storage, for_user = store_user, id = id });