fix: use space-parent check to exclude text channels from call button

This commit is contained in:
root
2026-05-15 15:47:28 -04:00
parent b2d36d79e6
commit 0d5ba83f40
+3 -1
View File
@@ -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)) && (
<CallButton />
)}
{screenSize === ScreenSize.Desktop && (