# HG changeset patch # User Kim Alvefur # Date 1509049334 -7200 # Node ID b41947a0fc0c8d244f0b0e888eadcebee7424b96 # Parent aa6497031924e7d526ed524598e74e7d40839c14 mod_carbons: Synthesize a 'to' attribute for carbons of stanzas to "self" (fixes #956) diff -r aa6497031924 -r b41947a0fc0c plugins/mod_carbons.lua --- a/plugins/mod_carbons.lua Tue Oct 17 12:42:20 2017 +0200 +++ b/plugins/mod_carbons.lua Thu Oct 26 22:22:14 2017 +0200 @@ -76,6 +76,9 @@ -- 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; + end copy.attr.xmlns = "jabber:client"; local carbon = st.message{ from = bare_jid, type = orig_type, } :tag(c2s and "sent" or "received", { xmlns = xmlns_carbons })