|
@@ -1,5 +1,6 @@
|
1
|
1
|
// @flow
|
2
|
2
|
|
|
3
|
+import { CHAT_ENABLED, getFeatureFlag } from '../../base/flags';
|
3
|
4
|
import { translate } from '../../base/i18n';
|
4
|
5
|
import { IconMessage, IconReply } from '../../base/icons';
|
5
|
6
|
import { getParticipantById } from '../../base/participants';
|
|
@@ -77,8 +78,12 @@ class PrivateMessageButton extends AbstractButton<Props, any> {
|
77
|
78
|
* @returns {Props}
|
78
|
79
|
*/
|
79
|
80
|
export function _mapStateToProps(state: Object, ownProps: Props): $Shape<Props> {
|
|
81
|
+ const enabled = getFeatureFlag(state, CHAT_ENABLED, true);
|
|
82
|
+ const { visible = enabled } = ownProps;
|
|
83
|
+
|
80
|
84
|
return {
|
81
|
|
- _participant: getParticipantById(state, ownProps.participantID)
|
|
85
|
+ _participant: getParticipantById(state, ownProps.participantID),
|
|
86
|
+ visible
|
82
|
87
|
};
|
83
|
88
|
}
|
84
|
89
|
|