New feature flag with ability to migrate GV1 groups

This commit is contained in:
Scott Nonnenberg 2020-12-01 08:42:35 -08:00 committed by GitHub
parent 089a6fb5a2
commit 2b8ae412e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 608 additions and 189 deletions

View file

@ -7,11 +7,14 @@ import { WebAPIType } from './textsecure/WebAPI';
type ConfigKeyType =
| 'desktop.cds'
| 'desktop.clientExpiration'
| 'desktop.disableGV1'
| 'desktop.gv2'
| 'desktop.mandatoryProfileSharing'
| 'desktop.messageRequests'
| 'desktop.storage'
| 'desktop.storageWrite';
| 'desktop.storageWrite'
| 'global.groupsv2.maxGroupSize'
| 'global.groupsv2.groupSizeHardLimit';
type ConfigValueType = {
name: ConfigKeyType;
enabled: boolean;
@ -112,3 +115,7 @@ export const maybeRefreshRemoteConfig = throttle(
export function isEnabled(name: ConfigKeyType): boolean {
return get(config, [name, 'enabled'], false);
}
export function getValue(name: ConfigKeyType): string | undefined {
return get(config, [name, 'value'], undefined);
}