aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-04 01:46:54 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-04 01:46:54 +0100
commit40d302c5b558ce79873f62c32a55e71d185c86be (patch)
tree919ea0ba9138f97d0648c0b2e8ed490ce076b2f3 /core/stanza_router.lua
parente77054f2ec767672d5b49c052c688b00d85ffa60 (diff)
downloadprosody-40d302c5b558ce79873f62c32a55e71d185c86be.tar.gz
prosody-40d302c5b558ce79873f62c32a55e71d185c86be.zip
stanza_router: Allow route/remote handlers to return false to block a stanza
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua2
1 files changed, 1 insertions, 1 deletions
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