Triggering a custom operation on ejabberd server just after a message Stanza has been sent to client

Hello,

I wanted a functionality in ejabberd that gets triggered just after a message stanza has been sent to the client.
For example Right now I am using user_send_packet hook that performs a custom operation every time any user sends the message stanza. The custom operation generates a new stanza(Packet) each time.

Now I wanted this new stanza(Packet) to pass as usual through the server (which it is doing right now) and to be sent to user/client.
But just after the Packet is sent to the client(I mean that at the time when the packet leaves the ejabberd server) I needed a hook that gets triggered. Is there any such hook present in ejabberd.

If not is there any other way I can trigger a custom operation once a packet is sent to the user/client.

Best Regards,
Abhishek Ranjan

Syndicate content