Browse Source

feat: feature flag for invite functionalities

j8
Bettenbuk Zoltan 5 years ago
parent
commit
5429b8568e

+ 6
- 0
react/features/base/flags/constants.js View File

12
  */
12
  */
13
 export const CHAT_ENABLED = 'chat.enabled';
13
 export const CHAT_ENABLED = 'chat.enabled';
14
 
14
 
15
+/**
16
+ * Flag indicating if invite functionality should be enabled.
17
+ * Default: enabled (true).
18
+ */
19
+export const INVITE_ENABLED = 'invite.enabled';
20
+
15
 /**
21
 /**
16
  * Flag indicating if recording should be enabled in iOS.
22
  * Flag indicating if recording should be enabled in iOS.
17
  * Default: disabled (false).
23
  * Default: disabled (false).

+ 3
- 1
react/features/invite/components/add-people-dialog/native/InviteButton.js View File

2
 
2
 
3
 import type { Dispatch } from 'redux';
3
 import type { Dispatch } from 'redux';
4
 
4
 
5
+import { getFeatureFlag, INVITE_ENABLED } from '../../../../base/flags';
5
 import { translate } from '../../../../base/i18n';
6
 import { translate } from '../../../../base/i18n';
6
 import { IconAddPeople } from '../../../../base/icons';
7
 import { IconAddPeople } from '../../../../base/icons';
7
 import { connect } from '../../../../base/redux';
8
 import { connect } from '../../../../base/redux';
50
  * @returns {Object}
51
  * @returns {Object}
51
  */
52
  */
52
 function _mapStateToProps(state: Object, ownProps: Object) {
53
 function _mapStateToProps(state: Object, ownProps: Object) {
53
-    const addPeopleEnabled = isAddPeopleEnabled(state) || isDialOutEnabled(state);
54
+    const addPeopleEnabled = getFeatureFlag(state, INVITE_ENABLED, true)
55
+        && (isAddPeopleEnabled(state) || isDialOutEnabled(state));
54
     const { visible = Boolean(addPeopleEnabled) } = ownProps;
56
     const { visible = Boolean(addPeopleEnabled) } = ownProps;
55
 
57
 
56
     return {
58
     return {

Loading…
Cancel
Save