# HG changeset patch # User Matthew Wild # Date 1710253905 0 # Node ID 3f5644aa5c32b006e0d10600961dd94101f00f46 # Parent 1d1eadff331d5fe4968929f29d08070dc7d03b13 mod_firewall: REPORT TO: Include id in reports diff -r 1d1eadff331d -r 3f5644aa5c32 mod_firewall/actions.lib.lua --- a/mod_firewall/actions.lib.lua Tue Mar 12 14:31:21 2024 +0000 +++ b/mod_firewall/actions.lib.lua Tue Mar 12 14:31:45 2024 +0000 @@ -267,14 +267,14 @@ reason = "urn:xmpp:reporting:abuse"; end local code = [[ - local newstanza = st.stanza("message", { to = %q, from = current_host }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); + local newstanza = st.stanza("message", { to = %q, from = current_host, id = new_short_id() }):tag("forwarded", { xmlns = "urn:xmpp:forward:0" }); local tmp_stanza = st.clone(stanza); tmp_stanza.attr.xmlns = "jabber:client"; newstanza:add_child(tmp_stanza):up(); newstanza:tag("report", { xmlns = "urn:xmpp:reporting:1", reason = %q }) do local text = %q; if text ~= "" then newstanza:text_tag("text", text); end end newstanza:up(); core_post_stanza(session, newstanza); ]]; - return code:format(where, reason, text), { "core_post_stanza", "current_host", "st" }; + return code:format(where, reason, text), { "core_post_stanza", "current_host", "st", "new_short_id" }; end return action_handlers;