comparison plugins/mod_carbons.lua @ 14186:d975d280baec

Merge 13.0->trunk
author Matthew Wild <mwild1@gmail.com>
date Mon, 25 May 2026 19:01:23 +0100
parents 54b30a374953 d79ef7a38fe8
children
comparison
equal deleted inserted replaced
14168:4f4c346e4f39 14186:d975d280baec
139 and (c2s or session.priority ~= top_priority) then 139 and (c2s or session.priority ~= top_priority) then
140 if not carbon then 140 if not carbon then
141 -- Create the carbon copy and wrap it as per the Stanza Forwarding XEP 141 -- Create the carbon copy and wrap it as per the Stanza Forwarding XEP
142 local copy = st.clone(stanza); 142 local copy = st.clone(stanza);
143 if c2s and not orig_to then 143 if c2s and not orig_to then
144 stanza.attr.to = bare_from; 144 copy.attr.to = bare_from;
145 end 145 end
146 copy.attr.xmlns = "jabber:client"; 146 copy.attr.xmlns = "jabber:client";
147 carbon = st.message{ from = bare_jid, type = orig_type, } 147 carbon = st.message{ from = bare_jid, type = orig_type, }
148 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons }) 148 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons })
149 :tag("forwarded", { xmlns = xmlns_forward }) 149 :tag("forwarded", { xmlns = xmlns_forward })