Comparison

plugins/mod_presence.lua @ 1731:38d87682cb4a

mod_presence: Fixed: Don't recursively handle inbound presence directed at local host
author Waqas Hussain <waqas20@gmail.com>
date Sun, 06 Sep 2009 01:32:36 +0500
parent 1641:af962e6ae781
child 2038:4ab83f96585a
comparison
equal deleted inserted replaced
1730:f4170bc82969 1731:38d87682cb4a
27 local core_route_stanza; 27 local core_route_stanza;
28 function core_route_stanza(origin, stanza) 28 function core_route_stanza(origin, stanza)
29 if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then 29 if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
30 local node, host = jid_split(stanza.attr.to); 30 local node, host = jid_split(stanza.attr.to);
31 host = hosts[host]; 31 host = hosts[host];
32 if host and host.type == "local" then 32 if node and host and host.type == "local" then
33 handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza); 33 handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza);
34 return; 34 return;
35 end 35 end
36 end 36 end
37 _core_route_stanza(origin, stanza); 37 _core_route_stanza(origin, stanza);