mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 07:22: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:
parent
d93d214f0e
commit
0a4cd79d4e
1 changed files with 3 additions and 3 deletions
|
@ -2338,12 +2338,12 @@ public class MultiUserChat {
|
||||||
if (statusCodes.contains(Status.KICKED_307)) {
|
if (statusCodes.contains(Status.KICKED_307)) {
|
||||||
// Check if this occupant was kicked
|
// Check if this occupant was kicked
|
||||||
if (isUserModification) {
|
if (isUserModification) {
|
||||||
|
// Reset occupant information.
|
||||||
|
userHasLeft();
|
||||||
|
|
||||||
for (UserStatusListener listener : userStatusListeners) {
|
for (UserStatusListener listener : userStatusListeners) {
|
||||||
listener.kicked(mucUser.getItem().getActor(), mucUser.getItem().getReason());
|
listener.kicked(mucUser.getItem().getActor(), mucUser.getItem().getReason());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reset occupant information.
|
|
||||||
userHasLeft();
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
for (ParticipantStatusListener listener : participantStatusListeners) {
|
for (ParticipantStatusListener listener : participantStatusListeners) {
|
||||||
|
|
Loading…
Reference in a new issue