Skip to content

Commit

Permalink
Change optIn to default to true
Browse files Browse the repository at this point in the history
  • Loading branch information
mikecote committed Nov 13, 2019
1 parent 7bb968c commit 46f4ba2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions src/legacy/core_plugins/telemetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ const telemetry = (kibana: any) => {
allowChangingOptInStatus: Joi.boolean().default(true),
optIn: Joi.when('allowChangingOptInStatus', {
is: false,
then: Joi.valid(true).required(),
otherwise: Joi.boolean()
.allow(null)
.default(null),
then: Joi.valid(true).default(true),
otherwise: Joi.boolean().default(true),
}),

// `config` is used internally and not intended to be set
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export class TelemetryForm extends Component {
type: 'boolean',
value: telemetryOptInProvider.getOptIn() || false,
description: this.renderDescription(),
defVal: false,
defVal: true,
}}
save={this.toggleOptIn}
clear={this.toggleOptIn}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const getTelemetryOptIn: GetTelemetryOptIn = ({
}

if (telemetrySavedObject === null || typeof telemetrySavedObject.enabled !== 'boolean') {
return null;
return configTelemetryOptIn;
}

const savedOptIn = telemetrySavedObject.enabled;
Expand Down

0 comments on commit 46f4ba2

Please sign in to comment.