Skip to content

Commit

Permalink
fix: send machineId only when tracking enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
f1ames committed Jan 2, 2024
1 parent 7f8f8d3 commit 44c35df
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions electron/app/services/cloud/client-config.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
import {type, release} from 'os';
import {machineIdSync} from 'node-machine-id';
import {app} from 'electron';
import electronStore from '@shared/utils/electronStore';

const CLIENT_NAME = 'Monokle Desktop';

export function getClientConfig() {
const isTrackingDisabled = Boolean(electronStore.get('appConfig.disableEventTracking'));
const additionalData = isTrackingDisabled ? undefined : { machineId: machineIdSync() };

return {
name: CLIENT_NAME,
version: app.getVersion(),
os: `${type()} ${release()}`,
additionalData: {
machineId: machineIdSync(),
}
additionalData,
};
}

0 comments on commit 44c35df

Please sign in to comment.