From 40d302c5b558ce79873f62c32a55e71d185c86be Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Fri, 4 May 2012 01:46:54 +0100 Subject: stanza_router: Allow route/remote handlers to return false to block a stanza --- core/stanza_router.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/stanza_router.lua b/core/stanza_router.lua index 54c5a1a6..0437fc05 100644 --- a/core/stanza_router.lua +++ b/core/stanza_router.lua @@ -192,7 +192,7 @@ function core_route_stanza(origin, stanza) stanza.attr.xmlns = nil; local routed = prosody.events.fire_event("route/remote", { origin = origin, stanza = stanza, from_host = from_host, to_host = host }); --FIXME: Should be per-host (shared modules!) stanza.attr.xmlns = xmlns; -- reset - if routed == nil then + if not routed then core_route_stanza(hosts[from_host], st.error_reply(stanza, "cancel", "not-allowed", "Communication with remote domains is not enabled")); end end -- cgit v1.2.3