1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-25 21:42:07 +01:00

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

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) {