Mercurial > prosody-hg
diff plugins/mod_presence.lua @ 1281:bc65d57c76ef
mod_presence: Add hooks for inbound presence
| author | Waqas Hussain <waqas20@gmail.com> |
|---|---|
| date | Tue, 02 Jun 2009 15:59:03 +0500 |
| parents | e360fef8882b |
| children | ff58ef687a3f |
line wrap: on
line diff
--- 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);
