Comparison

mod_carbons/mod_carbons.lua @ 896:d24d87ca3f5f

mod_carbons: <forwarded/> should be nested in <sent/>/<received/>
author Florian Zeitz <florob@babelmonkeys.de>
date Wed, 16 Jan 2013 02:27:49 +0100
parent 888:f8d08f8ed7de
child 900:aca1c5eb0508
comparison
equal deleted inserted replaced
895:1f4d77104da5 896:d24d87ca3f5f
88 88
89 -- Create the carbon copy and wrap it as per the Stanza Forwarding XEP 89 -- Create the carbon copy and wrap it as per the Stanza Forwarding XEP
90 local copy = st.clone(stanza); 90 local copy = st.clone(stanza);
91 copy.attr.xmlns = "jabber:client"; 91 copy.attr.xmlns = "jabber:client";
92 local carbon = st.message{ from = bare_jid, type = orig_type, } 92 local carbon = st.message{ from = bare_jid, type = orig_type, }
93 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons }):up() 93 :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons })
94 :tag("forwarded", { xmlns = xmlns_forward }) 94 :tag("forwarded", { xmlns = xmlns_forward })
95 :add_child(copy):reset(); 95 :add_child(copy):reset();
96 96
97 -- COMPAT 97 -- COMPAT
98 local carbon_old = st.message{ from = bare_jid, type = orig_type, } 98 local carbon_old = st.message{ from = bare_jid, type = orig_type, }