I just found a small issue in MUC code. In MUCRoomImpl.setMembersOnly there’s a call to kickOccupant(): presences.add(kickOccupant(occupant.getRoleAddress(), null, LocaleUtils.getLocalizedString(“muc.roomIsNowMembersOnly”)));
kickOccupant() is supposed to have the JID of the user as first parameter (user@server). Here we’re passing the JID of the user in room: room@server/user . The call should be something like that instead:
presences.add(kickOccupant(occupant.getChatUser().getAddress(), null, LocaleUtils.getLocalizedString(“muc.roomIsNowMembersOnly”)));
I checked other calls to kickOccupant() and they seem fime. A test case for this bug is to connect 2 clients, have them enter a MUC room, go to OF admin console, and in the room options check ‘Make Room Members-only’ and save -> occupants are never kicked from the room.