change parameter to use preset enum

This commit is contained in:
Germain Souquet 2021-06-15 00:01:05 +01:00
parent 07bdaeaf70
commit 2e6dab0bcd

View file

@ -72,7 +72,7 @@ export default class CreateRoomDialog extends React.Component<IProps, IState> {
canChangeEncryption: true,
};
MatrixClientPeg.get().doesServerForceEncryptionForPreset("private")
MatrixClientPeg.get().doesServerForceEncryptionForPreset(Preset.PrivateChat)
.then(isForced => this.setState({ canChangeEncryption: !isForced }));
}