From 649aefc28e661f4c89f49e6600646de4a673b99c Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Mon, 18 Jan 2010 17:14:41 +0000 Subject: mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153 --- plugins/mod_presence.lua | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins') diff --git a/plugins/mod_presence.lua b/plugins/mod_presence.lua index abbc3a3d..815b5c8b 100644 --- a/plugins/mod_presence.lua +++ b/plugins/mod_presence.lua @@ -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; -- cgit v1.2.3