diff --git a/src/app/features/room/RoomViewHeader.tsx b/src/app/features/room/RoomViewHeader.tsx index 953eef736..6db36889b 100644 --- a/src/app/features/room/RoomViewHeader.tsx +++ b/src/app/features/room/RoomViewHeader.tsx @@ -38,6 +38,7 @@ import { settingsAtom } from '../../state/settings'; import { useSpaceOptionally } from '../../hooks/useSpace'; import { getHomeSearchPath, getSpaceSearchPath, withSearchParam } from '../../pages/pathUtils'; import { getCanonicalAliasOrRoomId, isRoomAlias, mxcUrlToHttp } from '../../utils/matrix'; +import { getStateEvents } from '../../utils/room'; import { _SearchPathSearchParams } from '../../pages/paths'; import * as css from './RoomViewHeader.css'; import { useRoomUnread } from '../../state/hooks/unread'; @@ -595,7 +596,8 @@ export function RoomViewHeader({ callView }: { callView?: boolean }) { } /> {!room.isCallRoom() && livekitSupported && rtcSupported && hasCallPermission && - (direct || room.getJoinRule() === 'invite') && ( + (direct || (room.getJoinRule() === 'invite' && + getStateEvents(room, StateEvent.SpaceParent).length === 0)) && ( )} {screenSize === ScreenSize.Desktop && (