From 0a4cd79d4ea0111dbe7e25e8ca191a2c40b53bed Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Tue, 7 Nov 2017 20:15:15 +0100 Subject: [PATCH] Call MultiUserChat.userHasLeft() before invoking listeners in case a listener throws, userHasLeft() will eventually have set the MutliUserChat instance to the right state. --- .../java/org/jivesoftware/smackx/muc/MultiUserChat.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java index 0990d5395..3ad1109ea 100644 --- a/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java +++ b/smack-extensions/src/main/java/org/jivesoftware/smackx/muc/MultiUserChat.java @@ -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) {