Add support for ACI safety numbers behind a feature flag

This commit is contained in:
Fedor Indutny 2023-07-13 21:06:42 +02:00 committed by Fedor Indutnyy
parent 42cd8ce792
commit c1580a5eb3
38 changed files with 1392 additions and 204 deletions

View file

@ -2,15 +2,18 @@
// SPDX-License-Identifier: AGPL-3.0-only
import { refreshRemoteConfig } from '../../RemoteConfig';
import type { WebAPIType } from '../../textsecure/WebAPI';
import type { UnwrapPromise } from '../../types/Util';
import type {
WebAPIType,
RemoteConfigResponseType,
} from '../../textsecure/WebAPI';
import { SECOND } from '../../util/durations';
export async function updateRemoteConfig(
newConfig: UnwrapPromise<ReturnType<WebAPIType['getConfig']>>
newConfig: RemoteConfigResponseType['config']
): Promise<void> {
const fakeServer = {
async getConfig() {
return newConfig;
return { config: newConfig, serverEpochTime: Date.now() / SECOND };
},
} as Partial<WebAPIType> as unknown as WebAPIType;