aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-02-11 18:11:41 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-02-11 18:11:41 +0500
commit33306b3fb77d532af2213ab876f059c70feb599e (patch)
treedf36119ec733a0322c6c9c193fce356568c903cb /core
parent2f24ab95fe28c13d85faf1dbfa16b0c3a90b46b1 (diff)
downloadprosody-33306b3fb77d532af2213ab876f059c70feb599e.tar.gz
prosody-33306b3fb77d532af2213ab876f059c70feb599e.zip
Fixed: Some presence stanzas from local users were not being routed correctly to components (ghosts in mod_muc)
Diffstat (limited to 'core')
-rw-r--r--core/stanza_router.lua8
1 files changed, 8 insertions, 0 deletions
diff --git a/core/stanza_router.lua b/core/stanza_router.lua
index 52a18eed..c27a6579 100644
--- a/core/stanza_router.lua
+++ b/core/stanza_router.lua
@@ -178,6 +178,14 @@ function core_route_stanza(origin, stanza)
origin = origin or hosts[from_host];
if not origin then return false; end
+ if hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource
+ return component_handle_stanza(origin, stanza);
+ elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server
+ return component_handle_stanza(origin, stanza);
+ elseif hosts[host] and hosts[host].type == "component" then -- directed at a component
+ return component_handle_stanza(origin, stanza);
+ end
+
if stanza.name == "presence" and (stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable") then resource = nil; end
local host_session = hosts[host]