您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

functions.ts 759B

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