Hello,
When using Smack to participate in a private chat within a MultiUserChat room, my MessageListener is never triggered.
When using the packetListener on the connection, I see the message-stanzas arriving fine, without errors. That means that I’m able to filter the incoming messages from within my packetlistener, but that way, I can only have one global messagelistener per connection, instead of a MessageListener per Chat instance.
How I (think I should) do Muc with PrivateChat:
//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////
XMPPConnection connection;
MultiUserChat muc = new MultiUserChat(connection, “roomname[AT]conference.domain.com”);
muc.join(“myNickname”);
Chat chat = muc.createPrivateChat(“you[AT]domain.com”, new MessageListener(){
public void processMessage(Chat chat, Message message) {
//WE NEVER GET HERE!!!
System.out.println("RECEIVED: “+message+” IN CHAT "+chat);
}
});
//////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////
What am I missing / what am I doing wrong here?