# HG changeset patch # User Kim Alvefur # Date 1348065392 -7200 # Node ID 07cc1efde2f8dfa4b1beda77316843b98274f636 # Parent 21e99dc949eec2c95c9fe38c59f58949fea3b98a mod_carbons: Fix handling of messages from remote hosts diff -r 21e99dc949ee -r 07cc1efde2f8 mod_carbons/mod_carbons.lua --- a/mod_carbons/mod_carbons.lua Wed Sep 19 01:30:58 2012 +0000 +++ b/mod_carbons/mod_carbons.lua Wed Sep 19 16:36:32 2012 +0200 @@ -26,6 +26,7 @@ local function message_handler(event, c2s) local origin, stanza = event.origin, event.stanza; local orig_type = stanza.attr.type; + local orig_from = stanza.attr.from; local orig_to = stanza.attr.to; if not (orig_type == nil @@ -35,7 +36,7 @@ end -- Stanza sent by a local client - local bare_jid = origin.username .. "@" .. origin.host; + local bare_jid = origin.type == "c2s" and origin.username .. "@" .. origin.host or jid_bare(orig_from); local target_session = origin; local top_priority = false; local user_sessions = host_sessions[origin.username];