[ejabberd] Timestamp in messages for connected clients

Gaurav Jain monkeyfdude at gmail.com
Sun Jan 22 08:12:04 MSK 2017


Thanks. I am able to get timestamp for live messages. I am using both
user_send_packet and user_receive_packet for consistency.

On Sat, Jan 21, 2017 at 3:25 PM, Gaurav Jain <monkeyfdude at gmail.com> wrote:

> Thank you. Looks like I need to use user_receive_packet instead of
> user_send_packet.
>
>
>
> On Sat, Jan 21, 2017 at 3:14 PM, Holger Weiß <holger at zedat.fu-berlin.de>
> wrote:
>
>> * 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).
>>
>> Holger
>> _______________________________________________
>> 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/20170121/5323a84d/attachment.html>


More information about the ejabberd mailing list