Timestamp on XMPP presence tag

XMPP (eXtensible Messaging and Presence Protocol) seems to miss a timestamp managed by the server on the presence tag.

To illustrate my view, let’s take a simple example. How many times have you logged into your Instant Messaging to talk to a friend and have seen his status as away, with the presence description as “Lunch” ? What doe s it mean actually ? Did he just left for lunch ? He is about to come back in a few minutes or should I expect to have him again available ?

The information you get from your friend status is sometimes meaningless because you miss some context data: When was the status message written. It does not have the same impact if it was written 2 days ago or 1 hour ago. Actually, the fact we miss this information seems now so obvious to me, that I wonder why we do not add timestamps before. Of course, this is less important if you are often connected because you can have a rough feeling of what your friend have been doing (or you have used a plugin in your instant messaging client to keep a record of your friend status changes).

Other type of XMPP usage might also require the timestamp information of your presence packets. With microblogging-like applications you need to put your friends information in a timeline. If you want to build a log of your friends status message in presence packet you need time information in standard presence packets.

The main XMPP specification does not take the need for presence timestamp into account. Fortunately, a draft XMPP extension allows to use timestamp on message and presence tags: Delayed Delivery (XEP-0203). However, this feature has been mostly designed to get delayed delivery of messages send to you through the offline storage or for chat room history that you usually receive when you enter the room. It means that no one yet is using it to define the “delay” of the standard presence packet reception.

I think this is something very important to improve the user experience and this is a feature I plan to add experimentaly in ejabberd (and OneTeam client) in a very close future. Stay tuned for feedback on this experiment.


Let us know what you think 💬


Leave a Comment


This site uses Akismet to reduce spam. Learn how your comment data is processed.