You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

functions.js 662B

1234567891011121314151617181920
  1. // @flow
  2. import { CALL_INTEGRATION_ENABLED, getFeatureFlag } from '../../base/flags';
  3. import { toState } from '../../base/redux';
  4. /**
  5. * Checks if call integration is enabled or not.
  6. *
  7. * @param {Function|Object} stateful - The redux store or {@code getState}
  8. * function.
  9. * @returns {string} - Default URL for the app.
  10. */
  11. export function isCallIntegrationEnabled(stateful: Function | Object) {
  12. const state = toState(stateful);
  13. const { disableCallIntegration } = state['features/base/settings'];
  14. const flag = getFeatureFlag(state, CALL_INTEGRATION_ENABLED);
  15. // The feature flag has precedence.
  16. return flag ?? !disableCallIntegration;
  17. }