comparison plugins/mod_carbons.lua @ 14006:0d162ef4e0c1

mod_carbons: Copy archive-id (if any) from original to carbon stanzas
author Matthew Wild <mwild1@gmail.com>
date Sat, 06 Dec 2025 17:30:47 +0000
parents 74b9e05af71e
children 54b30a374953
comparison
equal deleted inserted replaced
14005:b6d857435de1 14006:0d162ef4e0c1
142 carbon = st.message{ from = bare_jid, type = orig_type, } 142 carbon = st.message{ from = bare_jid, type = orig_type, }
143 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons }) 143 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons })
144 :tag("forwarded", { xmlns = xmlns_forward }) 144 :tag("forwarded", { xmlns = xmlns_forward })
145 :add_child(copy):reset(); 145 :add_child(copy):reset();
146 146
147 carbon:set_meta("archive-id", stanza:get_meta("archive-id"));
147 end 148 end
148 149
149 carbon.attr.to = session.full_jid; 150 carbon.attr.to = session.full_jid;
150 module:log("debug", "Sending carbon to %s", session.full_jid); 151 module:log("debug", "Sending carbon to %s", session.full_jid);
151 session.send(carbon); 152 session.send(carbon);