How to properly listen for MultiUserChat in Smack?
I'm not sure how to properly listen for MultiUserChats, since there are apparently two different ways to listen for them. The first way is to add a MessageListener for each room, like this: MultiUserChat muc = new MultiUserChat(connection,"MyGroup"); muc.addMessageListener(new PacketListener() { @Override public void processPacket(Packet packet) throws NotConnectedException { // TODO Auto-generated method stub } }); The second way is to listen as you would for normal single-chat messages: PacketFilter filter = new MessageTypeFilter(Message.Type.groupchat); connection.addPacketListener(new