Software /
code /
prosody-modules
Diff
mod_firewall/actions.lib.lua @ 2581:0116672348c4
mod_firewall: Fix syntax error in generated code with some route modification actions
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 25 Feb 2017 18:36:21 +0000 |
parent | 2560:fda47e2135e5 |
child | 2782:8fd37f0e108c |
line wrap: on
line diff
--- a/mod_firewall/actions.lib.lua Sat Feb 25 17:05:40 2017 +0000 +++ b/mod_firewall/actions.lib.lua Sat Feb 25 18:36:21 2017 +0000 @@ -122,11 +122,11 @@ local function route_modify(make_new, to, drop) local reroute, deps = "session.send(newstanza)", { "st" }; if to then - reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza);"):format(to); + reroute = ("newstanza.attr.to = %q; core_post_stanza(session, newstanza)"):format(to); deps[#deps+1] = "core_post_stanza"; end - return ([[local newstanza = st.%s; %s;%s]]) - :format(make_new, reroute, drop and " do return true end" or ""), deps; + return ([[do local newstanza = st.%s; %s;%s end]]) + :format(make_new, reroute, drop and " return true" or ""), deps; end function action_handlers.BOUNCE(with)