# HG changeset patch # User Matthew Wild # Date 1336092414 -3600 # Node ID 897ec7dcdaa68dc9df4fe38c47306a4d7520ec33 # Parent 04e6115e060b4deb7b77899bfd88c2f46af524a9 stanza_router: Allow route/remote handlers to return false to block a stanza diff -r 04e6115e060b -r 897ec7dcdaa6 core/stanza_router.lua --- a/core/stanza_router.lua Fri May 04 01:13:33 2012 +0200 +++ b/core/stanza_router.lua Fri May 04 01:46:54 2012 +0100 @@ -192,7 +192,7 @@ 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