I’m building a custom plugin which adds controls on the users joining a MUC. To do that, I implemented a MUCEventDelegate and placed my controls on the joiningRoom function. Unfortunately this function can only return true or false. When I return false, Openfire always returns that the user has invalid credential which isn’t the right error.
A solution would be to throw a custom UnauthorizedException with a message describing the cause as it’s done for the PacketRejectedException in the PacketInterceptor.