MUC discover message time


I’m still struggling with the MUC integration in my Android application using asmack. When I connect to a chatroom that already contains some messages between other users, I get the chat history (I set it up in Openfire config). However, I have no idea how to discover WHEN exactly had the message been sent by those users. Such information is not available in the Message packet, or is it? I see Spark doing it but I couldn’t find it in the source code.

Any help would be appreciated.



A friend of mine found out how to do it. He used the extensions mechanism the following way:

DelayInformation delay = (DelayInformation) message.getExtension(“x”, “jabber:x:delay”);

String jid = null;

long messageTime = 0;

if (delay != null) {

jid = delay.getFrom();

messageTime = delay.getStamp().getTime();


Where message is of Message type, obviously.