# HG changeset patch # User Matthew Wild # Date 1263834881 0 # Node ID f5cd7ee409ebe3ece700fa924625ce7c4c05dccf # Parent a82bd02d5918e8bd204ec3dd9a8cac5cdaa939bf mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153 diff -r a82bd02d5918 -r f5cd7ee409eb plugins/mod_presence.lua --- a/plugins/mod_presence.lua Mon Jan 18 16:31:57 2010 +0000 +++ b/plugins/mod_presence.lua Mon Jan 18 17:14:41 2010 +0000 @@ -309,6 +309,13 @@ 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;