mod_presence: Fixed: Don't recursively handle inbound presence directed at local...
authorWaqas Hussain <waqas20@gmail.com>
Sat, 5 Sep 2009 20:32:36 +0000 (01:32 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Sat, 5 Sep 2009 20:32:36 +0000 (01:32 +0500)
plugins/mod_presence.lua

index f78a5950ad3315e6a21b0a65e3cb67f41bdb2d96..d696612d9d7941b1b62f82bf8722fd7f23e6ebf7 100644 (file)
@@ -29,7 +29,7 @@ function core_route_stanza(origin, stanza)
        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