fix: enable telemetry by default

This commit is contained in:
dragonwocky 2023-02-04 13:41:14 +11:00
parent 0fff732fd9
commit 3e379f44e8
Signed by: dragonwocky
GPG Key ID: 7998D08F7D7BD7A8
2 changed files with 2 additions and 2 deletions

View File

@ -13,7 +13,7 @@ function Telemetry() {
const { html, initDatabase } = globalThis.__enhancerApi,
_get = async () => {
// defaults to true, must be explicitly set to false to disable
return initDatabase().get("telemetryEnabled") ?? true;
return (await initDatabase().get("telemetryEnabled")) ?? true;
},
_set = async (value) => {
await initDatabase().set("telemetryEnabled", value);

View File

@ -18,7 +18,7 @@ const collectTelemetryData = async () => {
sendTelemetryPing = async () => {
const db = globalThis.__enhancerApi.initDatabase(),
agreedToTerms = await db.get("agreedToTerms"),
telemetryEnabled = await db.get("telemetryEnabled");
telemetryEnabled = (await db.get("telemetryEnabled")) ?? true;
if (!telemetryEnabled || agreedToTerms !== version) return;
// telemetry
const telemetryData = await collectTelemetryData();