plugins/mod_presence.lua

changeset 1731
38d87682cb4a
parent 1641
af962e6ae781
child 2038
4ab83f96585a
--- 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