Use X-Signal-Timestamp header

This commit is contained in:
Fedor Indutny
2025-01-16 20:17:04 -08:00
committed by GitHub
parent dfeb54f898
commit 47cf3266f2
5 changed files with 27 additions and 18 deletions

View File

@@ -6,14 +6,13 @@ import type {
WebAPIType,
RemoteConfigResponseType,
} from '../../textsecure/WebAPI';
import { SECOND } from '../../util/durations';
export async function updateRemoteConfig(
newConfig: RemoteConfigResponseType['config']
): Promise<void> {
const fakeServer = {
async getConfig() {
return { config: newConfig, serverEpochTime: Date.now() / SECOND };
return { config: newConfig, serverTimestamp: Date.now() };
},
} as Partial<WebAPIType> as unknown as WebAPIType;