# HG changeset patch # User Matthew Wild # Date 1242918410 -3600 # Node ID fff8158faae210169542833067ce0dc6bc9f6bfa # Parent 078eb3b109e9664c3e5c78b3cdea37a000dbdd21 stanza_router: Fix for subscriptions to users on components [0.4 branch only] diff -r 078eb3b109e9 -r fff8158faae2 core/stanza_router.lua --- a/core/stanza_router.lua Mon May 18 04:48:35 2009 +0100 +++ b/core/stanza_router.lua Thu May 21 16:06:50 2009 +0100 @@ -123,14 +123,14 @@ core_handle_stanza(origin, stanza); elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza); + elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then + handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource component_handle_stanza(origin, stanza); elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server component_handle_stanza(origin, stanza); elseif hosts[host] and hosts[host].type == "component" then -- directed at a component component_handle_stanza(origin, stanza); - elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then - handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); elseif hosts[host] and hosts[host].type == "local" and stanza.name == "iq" and not resource then -- directed at bare JID core_handle_stanza(origin, stanza); else