aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_presence.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2010-01-18 17:14:41 +0000
committerMatthew Wild <mwild1@gmail.com>2010-01-18 17:14:41 +0000
commit649aefc28e661f4c89f49e6600646de4a673b99c (patch)
tree8de769f24cc455c50d44a7ed5b6faf0f08abc0a2 /plugins/mod_presence.lua
parentf4e886e7177eaf24ac415e3b8ebc80af256a3232 (diff)
downloadprosody-649aefc28e661f4c89f49e6600646de4a673b99c.tar.gz
prosody-649aefc28e661f4c89f49e6600646de4a673b99c.zip
mod_presence: Automatically deny presence requests for hosts, fixes traceback in #153
Diffstat (limited to 'plugins/mod_presence.lua')
-rw-r--r--plugins/mod_presence.lua7
1 files changed, 7 insertions, 0 deletions
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;