diff --git a/src/app/features/create-room/CreateRoom.tsx b/src/app/features/create-room/CreateRoom.tsx index a83f7ca7..2aeddb5f 100644 --- a/src/app/features/create-room/CreateRoom.tsx +++ b/src/app/features/create-room/CreateRoom.tsx @@ -76,27 +76,6 @@ export function CreateRoomKindSelector({ }: CreateRoomKindSelectorProps) { return ( - onSelect(CreateRoomKind.Private)} - disabled={disabled} - > - } - after={value === CreateRoomKind.Private && } - > - Private - - Only people with invite can join. - - - {canRestrict && ( )} + onSelect(CreateRoomKind.Private)} + disabled={disabled} + > + } + after={value === CreateRoomKind.Private && } + > + Private + + Only people with invite can join. + + + Public - Anyone with the room address can join. + Anyone with the address can join. @@ -458,14 +458,16 @@ export function CreateRoomForm({ defaultKind, space, onCreate }: CreateRoomFormP const capabilities = useCapabilities(); const roomVersion = capabilities['m.room_versions']; const [selectedRoomVersion, selectRoomVersion] = useState(roomVersion?.default ?? '1'); + const allowRestricted = space && restrictedSupported(selectedRoomVersion); - const [kind, setKind] = useState(defaultKind ?? CreateRoomKind.Private); + const [kind, setKind] = useState( + defaultKind ?? allowRestricted ? CreateRoomKind.Restricted : CreateRoomKind.Private + ); const [federation, setFederation] = useState(true); const [encryption, setEncryption] = useState(false); const [knock, setKnock] = useState(false); const [advance, setAdvance] = useState(false); - const allowRestricted = space && restrictedSupported(selectedRoomVersion); const allowKnock = kind === CreateRoomKind.Private && knockSupported(selectedRoomVersion); const allowKnockRestricted = kind === CreateRoomKind.Restricted && knockRestrictedSupported(selectedRoomVersion);