Call MultiUserChat.userHasLeft() before invoking listeners

in case a listener throws, userHasLeft() will eventually have set the
MutliUserChat instance to the right state.
This commit is contained in:
Florian Schmaus 2017-11-07 20:15:15 +01:00
parent d93d214f0e
commit 0a4cd79d4e
1 changed files with 3 additions and 3 deletions

View File

@ -2338,12 +2338,12 @@ public class MultiUserChat {
if (statusCodes.contains(Status.KICKED_307)) {
// Check if this occupant was kicked
if (isUserModification) {
// Reset occupant information.
userHasLeft();
for (UserStatusListener listener : userStatusListeners) {
listener.kicked(mucUser.getItem().getActor(), mucUser.getItem().getReason());
}
// Reset occupant information.
userHasLeft();
}
else {
for (ParticipantStatusListener listener : participantStatusListeners) {