aboutsummaryrefslogtreecommitdiffstats
path: root/core
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
commita52b9558d003360798e5e7b98f867e4806c91941 (patch)
tree919ea0ba9138f97d0648c0b2e8ed490ce076b2f3 /core
parent9aa5ccbee67fc1e19afc292aaa81621d8b7101b5 (diff)
downloadprosody-a52b9558d003360798e5e7b98f867e4806c91941.tar.gz
prosody-a52b9558d003360798e5e7b98f867e4806c91941.zip
stanza_router: Allow route/remote handlers to return false to block a stanza
Diffstat (limited to 'core')
-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