I have configured openfire chat server for my app but while chatting it does not send chat timestamp. if i append timestamp from my side then client gets wrong time as he is in some other country.Please suggest how to configure timestamp for each chat that i send to client like in watsapp.
Live messages in xmpp doesn’t have timestamps, that’s why Openfire is not sending them. What is the point to have a timestamp of a live message?
Suppose if we are chatting to someone who is in some other country, how will he/she get to know that at what time the message is delivered to him/her?
His client should show a timestamp with his PC/mobile local time when message appears. This is stricly client’s function as the server as i said do not append timestamps for live messages. Timestamps are only appended to offline messages.
I don’t get your example. When the message arrives without a timestamp, it was sent “just now” (it’s a “live” message). The client is free to show it with some kind of timestamp, obviously, but that need not be included in the message itself.
When the client that sent the original message included a timestamp, than that timestamp would still be in the message when it gets delivered. Openfire will not remove anything.
If you’re interested in the local time of the entity that send the message, you could query it, using either XEP-0090: Legacy Entity Time or XEP-0202: Entity Time
I you desperately want a timestamp with every message, it would not be so hard to create an Openfire plugin that simply adds a timestamp to all messages that are being processed.
will you name any plugin which sends timestamp with every message in utc format.
I just want to show the time in group chat (like in whatsapp) to every user in that particular group.
I am assuming that this is the client, that simply adds a local timestamp when the incoming message does not contain a timestamp.
To my knowledge, there is no such plugin. One will need to be created.