What is the best practice for using #getOccupants?
MultiUserChat muc = new MultiUserChat(myChat.getConnection(),“firstname.lastname@example.org”);
Iterator i = muc.getOccupants();
System.out.println("occupant name " + i.next());
I join the room and want to get the occupants, but #getOccupants does not return anything back.
Adding Thread.sleep(500) and then #getOccupants, seems to work.
Is there a better way?