Changeset

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
parents 1730:f4170bc82969
children 1732:f1282fad2f99
files plugins/mod_presence.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_presence.lua	Sun Sep 06 01:31:18 2009 +0500
+++ b/plugins/mod_presence.lua	Sun Sep 06 01:32:36 2009 +0500
@@ -29,7 +29,7 @@
 	if stanza.attr.type ~= nil and stanza.attr.type ~= "unavailable" and stanza.attr.type ~= "error" then
 		local node, host = jid_split(stanza.attr.to);
 		host = hosts[host];
-		if host and host.type == "local" then
+		if node and host and host.type == "local" then
 			handle_inbound_presence_subscriptions_and_probes(origin, stanza, jid_bare(stanza.attr.from), jid_bare(stanza.attr.to), core_route_stanza);
 			return;
 		end