feat(giphy) disable feature from dynamic branding (#12620)

This commit is contained in:
Mihaela Dumitru 2022-12-08 16:02:31 +02:00 committed by GitHub
parent 9a8a8ef7ad
commit 33e4da32e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View File

@ -156,6 +156,7 @@ export interface IDynamicBrandingState {
logoImageUrl: string;
muiBrandedTheme?: boolean;
premeetingBackground: string;
showGiphyIntegration?: boolean;
useDynamicBrandingData: boolean;
virtualBackgrounds: Array<Image>;
}
@ -178,6 +179,7 @@ ReducerRegistry.register<IDynamicBrandingState>(STORE_NAME, (state = DEFAULT_STA
logoImageUrl,
muiBrandedTheme,
premeetingBackground,
showGiphyIntegration,
virtualBackgrounds
} = action.value;
@ -193,6 +195,7 @@ ReducerRegistry.register<IDynamicBrandingState>(STORE_NAME, (state = DEFAULT_STA
logoImageUrl,
muiBrandedTheme,
premeetingBackground,
showGiphyIntegration,
customizationFailed: false,
customizationReady: true,
useDynamicBrandingData: true,

View File

@ -68,12 +68,13 @@ export function getGifAPIKey(state: IReduxState) {
export function isGifEnabled(state: IReduxState) {
const { disableThirdPartyRequests } = state['features/base/config'];
const { giphy } = state['features/base/config'];
const showGiphyIntegration = state['features/dynamic-branding']?.showGiphyIntegration !== false;
if (navigator.product === 'ReactNative' && window.JITSI_MEET_LITE_SDK) {
return false;
}
return Boolean(!disableThirdPartyRequests && giphy?.enabled && Boolean(giphy?.sdkKey));
return showGiphyIntegration && Boolean(!disableThirdPartyRequests && giphy?.enabled && Boolean(giphy?.sdkKey));
}
/**