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