origin.directed = origin.directed or {};\r
origin.directed[to] = true;\r
end\r
- if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then\r
+ if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then\r
handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);\r
elseif not to then\r
handle_normal_presence(origin, stanza, core_route_stanza);\r
core_route_stanza(origin, stanza);\r
end\r
elseif (origin.type == "s2sin" or origin.type == "component") and hosts[host] then\r
- if to == nil and stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then\r
+ if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then\r
handle_inbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza);\r
else\r
core_route_stanza(origin, stanza);\r