From 40b8d6168bf7da6be083d58d279434dca05e1128 Mon Sep 17 00:00:00 2001 From: Calin-Teodor Date: Thu, 25 Sep 2025 15:43:16 +0300 Subject: [PATCH] feat(base/flags): add warning for unsupported feature flags --- react/features/base/flags/actions.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/react/features/base/flags/actions.ts b/react/features/base/flags/actions.ts index 457a840086..52810f0d56 100644 --- a/react/features/base/flags/actions.ts +++ b/react/features/base/flags/actions.ts @@ -1,4 +1,7 @@ +import logger from '../app/logger'; + import { UPDATE_FLAGS } from './actionTypes'; +import * as featureFlags from './constants'; /** * Updates the current features flags with the given ones. They will be merged. @@ -10,6 +13,13 @@ import { UPDATE_FLAGS } from './actionTypes'; * }} */ export function updateFlags(flags: Object) { + const supportedFlags = Object.values(featureFlags); + const unsupportedFlags = Object.keys(flags).filter(flag => !supportedFlags.includes(flag as any)); + + if (unsupportedFlags.length > 0) { + logger.warn(`The following feature flags are not supported: ${unsupportedFlags.join(', ')}.`); + } + return { type: UPDATE_FLAGS, flags