diff options
author | Kim Alvefur <zash@zash.se> | 2017-10-26 22:22:14 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2017-10-26 22:22:14 +0200 |
commit | 67bef1f73cbad7906ffcc6562fa7dfc90b60d8fa (patch) | |
tree | 415c5ffd361cb4212fd774b16cb92e8872eb80f9 /plugins | |
parent | 0652f919b8d9a7dd998cbdbb5eac45697f5141b7 (diff) | |
download | prosody-67bef1f73cbad7906ffcc6562fa7dfc90b60d8fa.tar.gz prosody-67bef1f73cbad7906ffcc6562fa7dfc90b60d8fa.zip |
mod_carbons: Synthesize a 'to' attribute for carbons of stanzas to "self" (fixes #956)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_carbons.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/plugins/mod_carbons.lua b/plugins/mod_carbons.lua index cb7d9233..1dcd4a07 100644 --- a/plugins/mod_carbons.lua +++ b/plugins/mod_carbons.lua @@ -76,6 +76,9 @@ local function message_handler(event, c2s) -- 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 }) |