Fixed: Outbound subscription requests silently dropped (regression in hg:7f17d0d00fbb)
authorWaqas Hussain <waqas20@gmail.com>
Fri, 7 Aug 2009 10:30:47 +0000 (15:30 +0500)
committerWaqas Hussain <waqas20@gmail.com>
Fri, 7 Aug 2009 10:30:47 +0000 (15:30 +0500)
plugins/mod_presence.lua

index 02ec6f7949459e6f720b674c6d8d377d70d6927f..f78a5950ad3315e6a21b0a65e3cb67f41bdb2d96 100644 (file)
@@ -165,7 +165,7 @@ end
 
 function handle_outbound_presence_subscriptions_and_probes(origin, stanza, from_bare, to_bare, core_route_stanza)
        local node, host = jid_split(from_bare);
-       if node == origin.username and host == origin.host then return; end -- No self contacts
+       if to_bare == origin.username.."@"..origin.host then return; end -- No self contacts
        local st_from, st_to = stanza.attr.from, stanza.attr.to;
        stanza.attr.from, stanza.attr.to = from_bare, to_bare;
        log("debug", "outbound presence "..stanza.attr.type.." from "..from_bare.." for "..to_bare);