feat: feature flag for invite functionalities
This commit is contained in:
parent
0eccaf9a21
commit
5429b8568e
|
@ -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…
Reference in New Issue