powered by Jive Software

MultiUserChat.createPrivateChat() message listener doesn''t work

I’'m having a problem with MultiUserChat.createPrivateChat() and message listeners. I can create the private chat fine, and the user on the other end (using a client other than mine) is able to get private messages I send to them. However, when they send me messages back, it seems the message listener never gets notified (as evidenced by the fact that a println debug statement shows the processPacket() method is never getting called).

The only time the listener works is if I start a private chat with myself. Then I can see my own messages echoed back to me from the server. But if I try to start a private chat with any other users, the listener never seems to get notified when that user sends a message to the private chat, although I can send that user messages all day and they get them fine.

Any help would be greatly appreciated.


My first reaction is to say you are running into a problem with thread ids. If you post a packet trace from the smack debugger window, it may help to diagnose your problem.

My first reaction is to say you are running into a

problem with thread ids.

Yes, is definately seems to be a problem with thread ids after looking at it in the dubugger.

If I start a conversation with myself, both the messages I send out, and the messages I get back have the same thread ID. However, if I start a private conversation with another user, the messages I send out have a thread ID, but the messages that I get from the other user have no thread ID at all.

Any suggestions?


Oh, just another note. I do have setFilteredOnThreadID(false) on the chat in question.

Are you setting setFilteredOnThreadId to be false before you create the chat though? Because basicly what chat does is it is locked in in setup. If you download the latest nightly build the situation should be fixed.