Fix accepting invite edge case where it wouldn't show the newly joined space

This commit is contained in:
Michael Telatynski 2021-04-25 09:24:26 +01:00
parent 47c12a7d23
commit 3bb6edbda7

View file

@ -414,7 +414,7 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
if ((membership || room.getMyMembership()) === "invite") { if ((membership || room.getMyMembership()) === "invite") {
this._invitedSpaces.add(room); this._invitedSpaces.add(room);
this.emit(UPDATE_INVITED_SPACES, this.invitedSpaces); this.emit(UPDATE_INVITED_SPACES, this.invitedSpaces);
} else if (oldMembership === "invite") { } else if (oldMembership === "invite" && membership !== "join") {
this._invitedSpaces.delete(room); this._invitedSpaces.delete(room);
this.emit(UPDATE_INVITED_SPACES, this.invitedSpaces); this.emit(UPDATE_INVITED_SPACES, this.invitedSpaces);
} else if (room?.isSpaceRoom()) { } else if (room?.isSpaceRoom()) {