signal-desktop/app/startup_config.ts

23 lines
654 B
TypeScript
Raw Normal View History

2021-10-01 11:49:59 -07:00
// Copyright 2021 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import { app } from 'electron';
import packageJson from '../package.json';
2025-06-16 11:59:31 -07:00
import { createLogger } from '../ts/logging/log';
2021-10-01 11:49:59 -07:00
import * as GlobalErrors from './global_errors';
2025-06-16 11:59:31 -07:00
const log = createLogger('startup_config');
2021-10-01 11:49:59 -07:00
GlobalErrors.addHandler();
// Set umask early on in the process lifecycle to ensure file permissions are
// set such that only we have read access to our files
process.umask(0o077);
2023-08-01 09:06:29 -07:00
export const AUMID = `org.whispersystems.${packageJson.name}`;
2025-06-16 09:47:18 -07:00
log.info('Set Windows Application User Model ID (AUMID)', {
2023-08-01 09:06:29 -07:00
AUMID,
2021-10-01 11:49:59 -07:00
});
2023-08-01 09:06:29 -07:00
app.setAppUserModelId(AUMID);