mod_presence: Automatically deny presence requests for hosts, fixes traceback in...
authorMatthew Wild <mwild1@gmail.com>
Mon, 18 Jan 2010 17:14:41 +0000 (17:14 +0000)
committerMatthew Wild <mwild1@gmail.com>
Mon, 18 Jan 2010 17:14:41 +0000 (17:14 +0000)
plugins/mod_presence.lua

index abbc3a3da3473638f260182398162dc047a9cd2d..815b5c8b427199eaef305eebc1134d563aa10d54 100644 (file)
@@ -309,6 +309,13 @@ module:hook("presence/bare", function(data)
        end
        return true;
 end);
+module:hook("presence/host", function (data)
+       local stanza = data.stanza;
+       local reply = st.reply(stanza);
+       reply.attr.type = "unsubscribed";
+       handle_inbound_presence_subscriptions_and_probes(data.origin, reply, jid_bare(stanza.attr.to), jid_bare(stanza.attr.from), core_route_stanza);
+       return true;
+end);
 module:hook("presence/full", function(data)
        -- inbound presence to full JID recieved
        local origin, stanza = data.origin, data.stanza;