aboutsummaryrefslogtreecommitdiffstats
path: root/core/stanza_router.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2009-06-26 05:54:03 +0100
committerMatthew Wild <mwild1@gmail.com>2009-06-26 05:54:03 +0100
commitccec4fa3dfc7e6ae63bdec101448771499d00ea9 (patch)
tree2abe6a1924c938b8c54feb4542a1261c7940ce91 /core/stanza_router.lua
parent03164502385bf737faed58ba494670296ff852f4 (diff)
downloadprosody-ccec4fa3dfc7e6ae63bdec101448771499d00ea9.tar.gz
prosody-ccec4fa3dfc7e6ae63bdec101448771499d00ea9.zip
stanza_router: Fire events also for stanzas to components
Diffstat (limited to 'core/stanza_router.lua')
-rw-r--r--core/stanza_router.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 472c9747..9d7bb36a 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -144,11 +144,11 @@ function core_post_stanza(origin, stanza)
end
local h = hosts[to_bare] or hosts[host or origin.host];
if h then
+ if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing
+
if h.type == "component" then
component_handle_stanza(origin, stanza);
return;
- else
- if h.events.fire_event(stanza.name..to_type, event_data) then return; end -- do processing
end
if not modules_handle_stanza(h.host, origin, stanza) then
if stanza.attr.xmlns == "jabber:client" and stanza.attr.type ~= "result" and stanza.attr.type ~= "error" then