Commit 503de5c0 authored by Ben Markwardt's avatar Ben Markwardt Committed by Guus der Kinderen

User not kicked from room after banning.

After banning, the user is not kicked from the room. The user is added
to the ban list so they can't re-join the room or post messages, but
they are not kicked out of the room so the user can still receive messages
sent to the room.

The problem is an additional check for isMembersOnly() was only allowing users
to be kicked from members only chat rooms. Whenever a user is marked as an
outcast they should be kicked from the room regardless of if the room is a
members only room or not.

Looks like this problem was introduced in commit
822abb01
parent a2f4d8c7
......@@ -1836,7 +1836,7 @@ public class LocalMUCRoom implements MUCRoom, GroupEventListener {
Log.info("New affiliation: " + newAffiliation);
try {
List<Presence> thisOccupant = changeOccupantAffiliation(senderRole, occupantJID, newAffiliation, newRole);
if (isMembersOnly() && kickMember) {
if (kickMember) {
// If the room is members-only, remove the user from the room including a status
// code of 321 to indicate that the user was removed because of an affiliation change
// a status code of 301 indicates the user was removed as an outcast
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment