mod_presence: Add hooks for inbound presence

Tue, 02 Jun 2009 15:59:03 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Tue, 02 Jun 2009 15:59:03 +0500
changeset 1281
bc65d57c76ef
parent 1280
e360fef8882b
child 1282
ff58ef687a3f

mod_presence: Add hooks for inbound presence

plugins/mod_presence.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_presence.lua	Tue Jun 02 15:58:19 2009 +0500
+++ b/plugins/mod_presence.lua	Tue Jun 02 15:59:03 2009 +0500
@@ -297,3 +297,12 @@
 module:hook("pre-presence/full", outbound_presence_handler);
 module:hook("pre-presence/bare", outbound_presence_handler);
 module:hook("pre-presence/host", outbound_presence_handler);
+
+module:hook("presence/bare", function(data)
+	-- inbound presence to bare JID recieved
+	local origin, stanza = data.origin, data.stanza;
+end);
+module:hook("presence/full", function(data)
+	-- inbound presence to full JID recieved
+	local origin, stanza = data.origin, data.stanza;
+end);

mercurial