Software /
code /
prosody
Changeset
1177:97ecfcec2d71
componentmanager: Don't error on stanzas to bare component JID
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sat, 16 May 2009 18:23:54 +0100 |
parents | 1176:2be14b7021b2 |
children | 1178:f332c033bfc8 |
files | core/componentmanager.lua |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/core/componentmanager.lua Sat May 16 12:01:44 2009 +0100 +++ b/core/componentmanager.lua Sat May 16 18:23:54 2009 +0100 @@ -67,8 +67,10 @@ 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]);