mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-29 07:22:07 +01:00
Remove unexpected MucNotJoinedException
from MultiUserChat.leave()
Occupant information should be reset after `leavePresence` and `reflectedLeavePresenceFilter` are built.
This commit is contained in:
parent
0f7b7df1f0
commit
22cff274bb
1 changed files with 4 additions and 4 deletions
|
@ -732,10 +732,6 @@ public class MultiUserChat {
|
|||
// "if (!joined) return" because it should be always be possible to leave the room in case the instance's
|
||||
// state does not reflect the actual state.
|
||||
|
||||
// Reset occupant information first so that we are assume that we left the room even if sendStanza() would
|
||||
// throw.
|
||||
userHasLeft();
|
||||
|
||||
final EntityFullJid myRoomJid = this.myRoomJid;
|
||||
if (myRoomJid == null) {
|
||||
throw new MucNotJoinedException(this);
|
||||
|
@ -757,6 +753,10 @@ public class MultiUserChat {
|
|||
)
|
||||
);
|
||||
|
||||
// Reset occupant information first so that we are assume that we left the room even if sendStanza() would
|
||||
// throw.
|
||||
userHasLeft();
|
||||
|
||||
Presence reflectedLeavePresence = connection.createStanzaCollectorAndSend(reflectedLeavePresenceFilter, leavePresence).nextResultOrThrow();
|
||||
|
||||
return reflectedLeavePresence;
|
||||
|
|
Loading…
Reference in a new issue