From 7509c79afb2e9c7a156af7f5a4960f6eaa4cd853 Mon Sep 17 00:00:00 2001 From: juancarmore Date: Fri, 5 Sep 2025 12:04:15 +0200 Subject: [PATCH] backend: update webhook preferences initialization to only enable webhooks if initial API key is defined --- backend/src/services/storage/storage.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/backend/src/services/storage/storage.service.ts b/backend/src/services/storage/storage.service.ts index 6f80066..a0bee8f 100644 --- a/backend/src/services/storage/storage.service.ts +++ b/backend/src/services/storage/storage.service.ts @@ -14,6 +14,7 @@ import { Readable } from 'stream'; import { MEET_INITIAL_ADMIN_PASSWORD, MEET_INITIAL_ADMIN_USER, + MEET_INITIAL_API_KEY, MEET_INITIAL_WEBHOOK_ENABLED, MEET_INITIAL_WEBHOOK_URL, MEET_NAME_ID @@ -694,7 +695,7 @@ export class MeetStorageService< return { projectId: MEET_NAME_ID, webhooksPreferences: { - enabled: MEET_INITIAL_WEBHOOK_ENABLED === 'true', + enabled: MEET_INITIAL_WEBHOOK_ENABLED === 'true' && MEET_INITIAL_API_KEY, url: MEET_INITIAL_WEBHOOK_URL }, securityPreferences: { @@ -727,7 +728,7 @@ export class MeetStorageService< */ protected async initializeApiKey(): Promise { // Check if initial API key is configured - const initialApiKey = process.env.MEET_INITIAL_API_KEY; + const initialApiKey = MEET_INITIAL_API_KEY; if (!initialApiKey) { this.logger.verbose('No initial API key configured, skipping API key initialization');