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';
|
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.
|
* Flag indicating if recording should be enabled in iOS.
|
||||||
* Default: disabled (false).
|
* Default: disabled (false).
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
import type { Dispatch } from 'redux';
|
import type { Dispatch } from 'redux';
|
||||||
|
|
||||||
|
import { getFeatureFlag, INVITE_ENABLED } from '../../../../base/flags';
|
||||||
import { translate } from '../../../../base/i18n';
|
import { translate } from '../../../../base/i18n';
|
||||||
import { IconAddPeople } from '../../../../base/icons';
|
import { IconAddPeople } from '../../../../base/icons';
|
||||||
import { connect } from '../../../../base/redux';
|
import { connect } from '../../../../base/redux';
|
||||||
|
@ -50,7 +51,8 @@ class InviteButton extends AbstractButton<Props, *> {
|
||||||
* @returns {Object}
|
* @returns {Object}
|
||||||
*/
|
*/
|
||||||
function _mapStateToProps(state: Object, ownProps: 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;
|
const { visible = Boolean(addPeopleEnabled) } = ownProps;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
Loading…
Reference in New Issue