diff options
author | Matthew Wild <mwild1@gmail.com> | 2009-05-16 18:23:54 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2009-05-16 18:23:54 +0100 |
commit | d18374c137186bea7b8675aa357cc492a1c95fe1 (patch) | |
tree | e553733e942fb89e2dd89c72ef754a0b70a533a8 /core | |
parent | 3b686ad3be847fdfe76bfb674267df2ccf84aba5 (diff) | |
download | prosody-d18374c137186bea7b8675aa357cc492a1c95fe1.tar.gz prosody-d18374c137186bea7b8675aa357cc492a1c95fe1.zip |
componentmanager: Don't error on stanzas to bare component JID
Diffstat (limited to 'core')
-rw-r--r-- | core/componentmanager.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua index d2a8d9f6..2053bff4 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -67,8 +67,10 @@ eventmanager.add_event_hook("server-starting", load_enabled_components); function handle_stanza(origin, stanza) local node, host = jid_split(stanza.attr.to); local component = nil; - if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server - if not component then component = components[host]; end + if host then + if node then component = components[node.."@"..host]; end -- hack to allow hooking node@server + if not component then component = components[host]; end + end if component then log("debug", "%s stanza being handled by component: %s", stanza.name, host); component(origin, stanza, hosts[host]); |