diff --git a/src/stores/spaces/SpaceStore.ts b/src/stores/spaces/SpaceStore.ts index 6e98868712b..3360e77c335 100644 --- a/src/stores/spaces/SpaceStore.ts +++ b/src/stores/spaces/SpaceStore.ts @@ -1116,7 +1116,8 @@ export class SpaceStoreClass extends AsyncStoreWithClient { case Action.ViewRoom: { // Don't auto-switch rooms when reacting to a context-switch or for new rooms being created // as this is not helpful and can create loops of rooms/space switching - if (payload.context_switch || payload.justCreatedOpts) break; + const isSpace = payload.justCreatedOpts?.roomType === RoomType.Space; + if (payload.context_switch || (payload.justCreatedOpts && !isSpace)) break; let roomId = payload.room_id; if (payload.room_alias && !roomId) {