signal-desktop/ts/util/isAdhocCallingEnabled.ts

20 lines
500 B
TypeScript
Raw Normal View History

2024-02-22 21:19:50 +00:00
// Copyright 2024 Signal Messenger, LLC
// SPDX-License-Identifier: AGPL-3.0-only
import * as RemoteConfig from '../RemoteConfig';
2024-10-16 18:08:47 +00:00
import { isBeta, isProduction } from './version';
2024-02-22 21:19:50 +00:00
export function isAdhocCallingEnabled(): boolean {
2024-10-16 18:08:47 +00:00
const version = window.getVersion();
if (isProduction(version)) {
return Boolean(RemoteConfig.isEnabled('desktop.calling.adhoc'));
}
if (isBeta(version)) {
return Boolean(RemoteConfig.isEnabled('desktop.calling.adhoc.beta'));
}
return true;
2024-02-22 21:19:50 +00:00
}