plugins/mod_presence.lua

changeset 2461
a6a50cf0e444
parent 2259
22417227d2ce
child 2525
e385511b3a54
--- 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;

mercurial