From e0fa526131a33bf51a97fa74b996ccd41cc3e288 Mon Sep 17 00:00:00 2001 From: Scott Nonnenberg Date: Tue, 9 May 2023 18:25:57 -0700 Subject: [PATCH] Remove desktop.retryReceiptLifespan feature flag --- ts/RemoteConfig.ts | 1 - ts/background.ts | 19 ++----------------- 2 files changed, 2 insertions(+), 18 deletions(-) diff --git a/ts/RemoteConfig.ts b/ts/RemoteConfig.ts index 99372e459576..e7ff780e09ec 100644 --- a/ts/RemoteConfig.ts +++ b/ts/RemoteConfig.ts @@ -28,7 +28,6 @@ export type ConfigKeyType = | 'desktop.messageCleanup' | 'desktop.messageRequests' | 'desktop.pnp' - | 'desktop.retryReceiptLifespan' | 'desktop.retryRespondMaxAge' | 'desktop.safetyNumberUUID.timestamp' | 'desktop.safetyNumberUUID' diff --git a/ts/background.ts b/ts/background.ts index a122a2de74a0..bb619d213a50 100644 --- a/ts/background.ts +++ b/ts/background.ts @@ -180,7 +180,7 @@ import { StartupQueue } from './util/StartupQueue'; import { showConfirmationDialog } from './util/showConfirmationDialog'; import { onCallEventSync } from './util/onCallEventSync'; import { sleeper } from './util/sleeper'; -import { MINUTE } from './util/durations'; +import { DAY, HOUR, MINUTE } from './util/durations'; import { copyDataMessageIntoMessage } from './util/copyDataMessageIntoMessage'; import { flushMessageCounter, @@ -194,7 +194,6 @@ import { makeLookup } from './util/makeLookup'; import { focusableSelectors } from './util/focusableSelectors'; export function isOverHourIntoPast(timestamp: number): boolean { - const HOUR = 1000 * 60 * 60; return isNumber(timestamp) && isOlderThan(timestamp, HOUR); } @@ -1002,27 +1001,13 @@ export async function startApp(): Promise { void window.Signal.RemoteConfig.initRemoteConfig(server); - let retryReceiptLifespan: number | undefined; - try { - retryReceiptLifespan = parseIntOrThrow( - window.Signal.RemoteConfig.getValue('desktop.retryReceiptLifespan'), - 'retryReceiptLifeSpan' - ); - } catch (error) { - log.warn( - 'Failed to parse integer out of desktop.retryReceiptLifespan feature flag' - ); - } - const retryPlaceholders = new RetryPlaceholders({ - retryReceiptLifespan, + retryReceiptLifespan: HOUR, }); window.Signal.Services.retryPlaceholders = retryPlaceholders; setInterval(async () => { const now = Date.now(); - const HOUR = 1000 * 60 * 60; - const DAY = 24 * HOUR; let sentProtoMaxAge = 14 * DAY; try {