Merge with waqas
authorMatthew Wild <mwild1@gmail.com>
Mon, 3 Aug 2009 16:53:02 +0000 (17:53 +0100)
committerMatthew Wild <mwild1@gmail.com>
Mon, 3 Aug 2009 16:53:02 +0000 (17:53 +0100)
plugins/mod_pep.lua
plugins/mod_presence.lua

index 768d4a4a68b60db5fb45fe8c91ec38ac52a4a6da..e07759f04189357bbcfe0ad7bee04804da92f304 100644 (file)
@@ -134,6 +134,7 @@ module:hook("iq/bare/http://jabber.org/protocol/pubsub:pubsub", function(event)
                                payload = payload.tags[1];
                                if payload then -- <item>
                                        publish(session, node, payload);
+                                       session.send(st.reply(stanza));
                                        return true;
                                end
                        end
index a077d7bd20471227b0771abc2d025b171b4492c7..02ec6f7949459e6f720b674c6d8d377d70d6927f 100644 (file)
@@ -165,6 +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
        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);