[ejabberd] When does the user_receive_packet hook gets started/triggered

Evgeny Khramtsov xramtsov at gmail.com
Fri Aug 25 23:13:47 MSK 2017

Fri, 25 Aug 2017 16:28:53 +0530 (IST)
Abhishek Ranjan <abhishek at blacklightsw.com> wrote:

> Does it start or gets triggered just before the packet is sent to
> client or does it starts after the packet is sent to the client.

Before, see

> does the packet wait for the module implementing user_receive_packet
> to finish and then goes to the client or it simple is not affected?

Yes, the hook should return the new {Packet, State} (either changed
or not), or return {drop, State} if the packet should be
silently dropped. You can see it in the code I linked above.

More information about the ejabberd mailing list