Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6797 from matrix-org/t3chguy/fix/19025
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Sep 14, 2021
2 parents 1298fdd + 919270f commit 9928079
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/stores/SpaceStore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
// 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
Expand Down

0 comments on commit 9928079

Please sign in to comment.