diff options
author | Waqas Hussain <waqas20@gmail.com> | 2008-12-24 05:10:13 +0500 |
---|---|---|
committer | Waqas Hussain <waqas20@gmail.com> | 2008-12-24 05:10:13 +0500 |
commit | 483f3cd6d6eb2b8591f0cff404b78e6f88cf4987 (patch) | |
tree | 059138c1c44d453a87e9ad23ff5ae18190f1be7c | |
parent | b6e1405a9aae4823c02bb2c9b8103f4b7ff3ac7b (diff) | |
download | prosody-483f3cd6d6eb2b8591f0cff404b78e6f88cf4987.tar.gz prosody-483f3cd6d6eb2b8591f0cff404b78e6f88cf4987.zip |
Changed order of checking for component hosts to check the full and bare JIDs before the hostname
-rw-r--r-- | core/componentmanager.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/componentmanager.lua b/core/componentmanager.lua index a63cfd7a..72cdda14 100644 --- a/core/componentmanager.lua +++ b/core/componentmanager.lua @@ -31,9 +31,10 @@ module "componentmanager" function handle_stanza(origin, stanza)
local node, host = jid_split(stanza.attr.to);
- local component = components[host];
+ local component = nil; + if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource if not component then component = components[node.."@"..host]; end -- hack to allow hooking node@server
- if not component then component = components[stanza.attr.to]; end -- hack to allow hooking node@server/resource and server/resource
+ if not component then component = components[host]; end if component then
log("debug", "stanza being handled by component: "..host);
component(origin, stanza, hosts[host]);
|