Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UBERF-9075 Disable meeting recordings when not using s3 or datalake #7618

Merged
merged 1 commit into from
Jan 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions services/love/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const main = async (): Promise<void> => {

// eslint-disable-next-line @typescript-eslint/no-misused-promises
app.get('/checkRecordAvailable', async (_req, res) => {
res.send(await checkRecordAvailable(storageConfig))
res.send(await checkRecordAvailable(storageConfig, s3storageConfig))
})

// eslint-disable-next-line @typescript-eslint/no-misused-promises
Expand Down Expand Up @@ -254,8 +254,13 @@ const createToken = async (roomName: string, _id: string, participantName: strin
return await at.toJwt()
}

const checkRecordAvailable = async (storageConfig: StorageConfig | undefined): Promise<boolean> => {
return storageConfig !== undefined
const checkRecordAvailable = async (
storageConfig: StorageConfig | undefined,
s3storageConfig: StorageConfig | undefined
): Promise<boolean> => {
if (storageConfig !== undefined && storageConfig.kind === 's3') return true
if (storageConfig !== undefined && storageConfig.kind === 'datalake' && s3storageConfig !== undefined) return true
return false
}

const startRecord = async (
Expand Down
6 changes: 0 additions & 6 deletions services/love/src/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,6 @@ export async function getS3UploadParams (
s3StorageConfig: StorageConfig | undefined
): Promise<S3UploadParams> {
if (storageConfig.kind === 's3') {
if (storageConfig.kind !== 's3') {
throw new Error('Please provide S3 storage config')
}
return await getS3UploadParamsS3(ctx, workspaceId, storageConfig as S3Config)
} else if (storageConfig.kind === 'datalake') {
if (s3StorageConfig === undefined || s3StorageConfig.kind !== 's3') {
Expand All @@ -62,9 +59,6 @@ export async function saveFile (
filename: string
): Promise<Blob | undefined> {
if (storageConfig.kind === 's3') {
if (storageConfig.kind !== 's3') {
throw new Error('Please provide S3 storage config')
}
return await saveFileToS3(ctx, workspaceId, storageConfig as S3Config, filename)
} else if (storageConfig.kind === 'datalake') {
if (s3StorageConfig === undefined || s3StorageConfig.kind !== 's3') {
Expand Down
Loading