Mercurial > prosody-hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
| 1280:e360fef8882b | 1281:bc65d57c76ef |
|---|---|
| 295 end | 295 end |
| 296 | 296 |
| 297 module:hook("pre-presence/full", outbound_presence_handler); | 297 module:hook("pre-presence/full", outbound_presence_handler); |
| 298 module:hook("pre-presence/bare", outbound_presence_handler); | 298 module:hook("pre-presence/bare", outbound_presence_handler); |
| 299 module:hook("pre-presence/host", outbound_presence_handler); | 299 module:hook("pre-presence/host", outbound_presence_handler); |
| 300 | |
| 301 module:hook("presence/bare", function(data) | |
| 302 -- inbound presence to bare JID recieved | |
| 303 local origin, stanza = data.origin, data.stanza; | |
| 304 end); | |
| 305 module:hook("presence/full", function(data) | |
| 306 -- inbound presence to full JID recieved | |
| 307 local origin, stanza = data.origin, data.stanza; | |
| 308 end); |
