fix(chat) hides send private chat button when enable.chat flag is false.

This commit is contained in:
titus.moldovan 2021-03-12 09:34:31 +02:00 committed by Saúl Ibarra Corretgé
parent b87c433e99
commit 2587eefefc
1 changed files with 6 additions and 1 deletions

View File

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