# HG changeset patch # User Matthew Wild # Date 1487858472 0 # Node ID 9392f45b0364c0b14658225a6b252fc7892f4074 # Parent 19a182651a9bda983a368c582d25e2174d61896e mod_firewall: Fix FORWARD to send from current module's host diff -r 19a182651a9b -r 9392f45b0364 mod_firewall/actions.lib.lua --- a/mod_firewall/actions.lib.lua Thu Feb 23 14:00:43 2017 +0000 +++ b/mod_firewall/actions.lib.lua Thu Feb 23 14:01:12 2017 +0000 @@ -157,11 +157,11 @@ function action_handlers.FORWARD(where) local code = [[ - local newstanza = st.stanza("message", { to = %q, from = session.host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); + local newstanza = st.stanza("message", { to = %q, from = current_host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza); core_post_stanza(session, newstanza); ]]; - return code:format(where), { "core_post_stanza" }; + return code:format(where), { "core_post_stanza", "current_host" }; end function action_handlers.LOG(string)