mod_presence: Fixed: Don't recursively handle inbound presence directed at local host

Sun, 06 Sep 2009 01:32:36 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 06 Sep 2009 01:32:36 +0500
changeset 1731
38d87682cb4a
parent 1730
f4170bc82969
child 1732
f1282fad2f99

mod_presence: Fixed: Don't recursively handle inbound presence directed at local host

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- 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

mercurial