Problem with latest messages posted in a MultiUserChat

Hi,

I have problem with my Smack client. When it joins a MultiUserchat, the chat history doesn’t work very well. (Just chat history)

I know that the MUC service will send the room history just for joining the room, but the number of messages I receive changes. Sometimes, I have only a half of my history messages or no message or the repeat messages.

I don’t know where the problem is because it’s not constant problem.

Does someone can help me?

Thanks,

Rabia

When are you adding the listener to the chat room?

Alex

Hi Alex,

Thanks for your replay,

I have a class, in this class I create connection and I create chat

(New XMPPConnection, connection.login, new MultiUserChat(connection, room) …)

After that I call chatPanel.initChat(); ( *class ChatPanel *extends JPanel)

In initChat(), I initialized the chat component and I add my listener

chat.addMessageListener(myListener);

Rabia