changeset 14184:d79ef7a38fe8 13.0

mod_carbons: Fix 'to' attribute of stanzas to own account This code intended to clarify the 'to' address on the forwarded stanza, however it updated the original stanza instead of the clone.
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 May 2026 16:20:02 +0100
parents 888d0c52db41
children e23b9651145d
files plugins/mod_carbons.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_carbons.lua	Mon May 25 16:14:56 2026 +0100
+++ b/plugins/mod_carbons.lua	Mon May 25 16:20:02 2026 +0100
@@ -141,7 +141,7 @@
 				-- Create the carbon copy and wrap it as per the Stanza Forwarding XEP
 				local copy = st.clone(stanza);
 				if c2s and not orig_to then
-					stanza.attr.to = bare_from;
+					copy.attr.to = bare_from;
 				end
 				copy.attr.xmlns = "jabber:client";
 				carbon = st.message{ from = bare_jid, type = orig_type, }