feat: feature flag for invite functionalities

pull/4806/head jitsi-meet_4060
Bettenbuk Zoltan 5 years ago committed by Zoltan Bettenbuk
parent 0eccaf9a21
commit 5429b8568e
  1. 6
      react/features/base/flags/constants.js
  2. 4
      react/features/invite/components/add-people-dialog/native/InviteButton.js

@ -12,6 +12,12 @@ export const CALENDAR_ENABLED = 'calendar.enabled';
*/
export const CHAT_ENABLED = 'chat.enabled';
/**
* Flag indicating if invite functionality should be enabled.
* Default: enabled (true).
*/
export const INVITE_ENABLED = 'invite.enabled';
/**
* Flag indicating if recording should be enabled in iOS.
* Default: disabled (false).

@ -2,6 +2,7 @@
import type { Dispatch } from 'redux';
import { getFeatureFlag, INVITE_ENABLED } from '../../../../base/flags';
import { translate } from '../../../../base/i18n';
import { IconAddPeople } from '../../../../base/icons';
import { connect } from '../../../../base/redux';
@ -50,7 +51,8 @@ class InviteButton extends AbstractButton<Props, *> {
* @returns {Object}
*/
function _mapStateToProps(state: Object, ownProps: Object) {
const addPeopleEnabled = isAddPeopleEnabled(state) || isDialOutEnabled(state);
const addPeopleEnabled = getFeatureFlag(state, INVITE_ENABLED, true)
&& (isAddPeopleEnabled(state) || isDialOutEnabled(state));
const { visible = Boolean(addPeopleEnabled) } = ownProps;
return {

Loading…
Cancel
Save