Serialize and retry mass-leave when leaving space
This commit is contained in:
parent
7d74cfecda
commit
acb89d3447
2 changed files with 21 additions and 8 deletions
|
@ -162,7 +162,9 @@ export const leaveSpace = (space: Room) => {
|
|||
if (!leave) return;
|
||||
const modal = Modal.createDialog(Spinner, null, "mx_Dialog_spinner");
|
||||
try {
|
||||
await Promise.all(rooms.map(r => leaveRoomBehaviour(r.roomId)));
|
||||
for (const room of rooms) {
|
||||
await leaveRoomBehaviour(room.roomId);
|
||||
}
|
||||
await leaveRoomBehaviour(space.roomId);
|
||||
} finally {
|
||||
modal.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue