AnsweredAssumed Answered

How to get openfire server time of incoming message

Question asked by Henry.He on May 18, 2015
Latest reply on May 21, 2015 by androidBee

Hi! I'm using smack and openfire to develop a chat application. I'm gonna use following code to get discussion history in a MultiUserChat room.


MultiUserChat muc = manager.getMultiUserChat(roomId);
DiscussionHistory discussionHistory = new DiscussionHistory();
discussionHistory.setSince(lastMessageDate); // the time of last message user received
muc.join(userId, null, discussionHistory, timeout);


And I have a problem here

1. I think I may not use client time as lastMessageDate because it can be changed by user and it's not accurate, so how can I get the server receiving time of user's last message?

2. Is it possible to let openfire server return a timestamp with every response when receiving messages?