mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 19:56:47 +03:00
Fix edge cases around joining new room which does not belong to active space
This commit is contained in:
parent
0ee77e2d17
commit
87c9551507
1 changed files with 9 additions and 2 deletions
|
@ -629,11 +629,18 @@ export class SpaceStoreClass extends AsyncStoreWithClient<IState> {
|
|||
};
|
||||
|
||||
private onRoom = (room: Room, newMembership?: string, oldMembership?: string) => {
|
||||
const membership = newMembership || room.getMyMembership();
|
||||
const roomMembership = room.getMyMembership();
|
||||
if (roomMembership === null) {
|
||||
// room is still being baked in the js-sdk, we'll process it at Room.myMembership instead
|
||||
return;
|
||||
}
|
||||
const membership = newMembership || roomMembership;
|
||||
|
||||
if (!room.isSpaceRoom()) {
|
||||
// this.onRoomUpdate(room);
|
||||
this.onRoomsUpdate();
|
||||
// this.onRoomsUpdate();
|
||||
// ideally we only need onRoomsUpdate here but it doesn't rebuild parentMap so always adds new rooms to Home
|
||||
this.rebuild();
|
||||
|
||||
if (membership === "join") {
|
||||
// the user just joined a room, remove it from the suggested list if it was there
|
||||
|
|
Loading…
Reference in a new issue