Software /
code /
prosody
Changeset
8354:b41947a0fc0c
mod_carbons: Synthesize a 'to' attribute for carbons of stanzas to "self" (fixes #956)
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 26 Oct 2017 22:22:14 +0200 |
parents | 8353:aa6497031924 |
children | 8355:45383e071ded |
files | plugins/mod_carbons.lua |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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 })