[ejabberd] ejabberd behavior b/w user disconnected vs user unavailable

Holger Weiß holger at zedat.fu-berlin.de
Thu Mar 12 19:28:49 MSK 2015


* Gaurav Jain <monkeyfdude at gmail.com> [2015-03-12 08:55]:
> I did look at the code and I found unset_presence_hook is called with four
> args, User, Server, Resource and Status. It does not give the full Presence
> packet to the hook. I wanted to inject some data in the presence packet
> sent by client and have a hook process that data.

The Status argument contains the optional <status/> element of the
<presence/> stanza, for what it's worth.

> how can I get access to full packet.

You can access all stanzas (including any unavailable <presence/>
stanzas) sent by the client via the 'user_send_packet' hook.

Holger


More information about the ejabberd mailing list