Mercurial > prosody-hg
comparison core/stanza_router.lua @ 1190:fff8158faae2
stanza_router: Fix for subscriptions to users on components [0.4 branch only]
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Thu, 21 May 2009 16:06:50 +0100 |
| parents | 5bab3eb566ad |
| children | 7f965bd37d65 |
comparison
equal
deleted
inserted
replaced
| 1186:078eb3b109e9 | 1190:fff8158faae2 |
|---|---|
| 121 core_handle_stanza(origin, stanza); | 121 core_handle_stanza(origin, stanza); |
| 122 elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server | 122 elseif hosts[to] and hosts[to].type == "local" then -- directed at a local server |
| 123 core_handle_stanza(origin, stanza); | 123 core_handle_stanza(origin, stanza); |
| 124 elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then | 124 elseif stanza.attr.xmlns and stanza.attr.xmlns ~= "jabber:client" and stanza.attr.xmlns ~= "jabber:server" then |
| 125 modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza); | 125 modules_handle_stanza(host or origin.host or origin.to_host, origin, stanza); |
| 126 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then | |
| 127 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); | |
| 126 elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource | 128 elseif hosts[to] and hosts[to].type == "component" then -- hack to allow components to handle node@server/resource and server/resource |
| 127 component_handle_stanza(origin, stanza); | 129 component_handle_stanza(origin, stanza); |
| 128 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server | 130 elseif hosts[to_bare] and hosts[to_bare].type == "component" then -- hack to allow components to handle node@server |
| 129 component_handle_stanza(origin, stanza); | 131 component_handle_stanza(origin, stanza); |
| 130 elseif hosts[host] and hosts[host].type == "component" then -- directed at a component | 132 elseif hosts[host] and hosts[host].type == "component" then -- directed at a component |
| 131 component_handle_stanza(origin, stanza); | 133 component_handle_stanza(origin, stanza); |
| 132 elseif origin.type == "c2s" and stanza.name == "presence" and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then | |
| 133 handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza); | |
| 134 elseif hosts[host] and hosts[host].type == "local" and stanza.name == "iq" and not resource then -- directed at bare JID | 134 elseif hosts[host] and hosts[host].type == "local" and stanza.name == "iq" and not resource then -- directed at bare JID |
| 135 core_handle_stanza(origin, stanza); | 135 core_handle_stanza(origin, stanza); |
| 136 else | 136 else |
| 137 core_route_stanza(origin, stanza); | 137 core_route_stanza(origin, stanza); |
| 138 end | 138 end |
