[ejabberd] Timestamp in messages for connected clients

Holger Weiß holger at zedat.fu-berlin.de
Sun Jan 22 02:14:21 MSK 2017

* Gaurav Jain <monkeyfdude at gmail.com> [2017-01-21 14:56]:
> When user A sends any message (direct or MUC/room) to user B, I want custom
> timestamp element in message packet received by B.
> Do I need to make changes in user_receive_packet?

When user A sends the message, the user_send_packet hook is invoked;
when user B receives it, user_receive_packet is invoked.  Using the
user_send_packet hook makes sure your code invoked for all outgoing
messages.  Using user_receive_packet makes sure it's invoked for all
incoming messages (including server-generated messages and messages from
remote users).


More information about the ejabberd mailing list