powered by Jive Software

Can Smack expose last message date of a MUC?

Hello all,

I’d like to know if SMACK has any Object to expose a Date (or a timestamp or whatelse) about last message sent in a given groupchat.

My use case: I’d like to join a muc and ask with Discussion History OR last 7 days OR if there are no messages in last 7 days, last recent message .

I’m able to do something like this:

DiscussionHistory dh = new DiscussionHistory();

dh.setSince( historyFromDate );

muc.join( name, password,dh, PACKET_REPLY_TIMEOUT);

OR

DiscussionHistory dh = new DiscussionHistory();

dh.setMaxStanzas( 1 );

muc.join( name, password,dh, PACKET_REPLY_TIMEOUT);

but I’d like to choose DiscussionHistory settings before join.

Does not seems that RoomInfo ( MultiUserChatManager.getInstanceFor(connection).getRoomInfo(room) ) does not expose the Date I need, nor MultiUserChat Object.

I checked on official spec about server MUST send minimum number of messages (so MaxStanzas and Since are in AND) while I need at least one message (an OR).

Any idea?

There is any IQ to check this date?

Thanx in advice

cheers