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

Abhishek Ranjan abhishek at blacklightsw.com
Sun Aug 27 19:12:01 MSK 2017


Thank you for the reply.

Best Regards,
Abhishek Ranjan

> On August 26, 2017 at 1:43 AM Evgeny Khramtsov <xramtsov at gmail.com> wrote:
>
>
> 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
> https://github.com/processone/ejabberd/blob/17.08/src/ejabberd_c2s.erl#L231-L236
>
> > 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.
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.jabber.ru/pipermail/ejabberd/attachments/20170827/52224947/attachment.html>


More information about the ejabberd mailing list