From c4131bb440dc6a6e3e0b44184b77903d4c10d139 Mon Sep 17 00:00:00 2001 From: Greyson Parrelli Date: Tue, 25 Mar 2025 20:06:32 -0400 Subject: [PATCH] Inline the attachment backfill flag. --- .../java/org/thoughtcrime/securesms/AppCapabilities.kt | 3 +-- .../securesms/messages/SyncMessageProcessor.kt | 6 ------ .../java/org/thoughtcrime/securesms/util/RemoteConfig.kt | 7 ------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/app/src/main/java/org/thoughtcrime/securesms/AppCapabilities.kt b/app/src/main/java/org/thoughtcrime/securesms/AppCapabilities.kt index 66b90a83a6..c9463edcd8 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/AppCapabilities.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/AppCapabilities.kt @@ -1,6 +1,5 @@ package org.thoughtcrime.securesms -import org.thoughtcrime.securesms.util.RemoteConfig import org.whispersystems.signalservice.api.account.AccountAttributes object AppCapabilities { @@ -15,7 +14,7 @@ object AppCapabilities { deleteSync = true, versionedExpirationTimer = true, storageServiceEncryptionV2 = true, - attachmentBackfill = RemoteConfig.attachmentBackfillSync + attachmentBackfill = true ) } } diff --git a/app/src/main/java/org/thoughtcrime/securesms/messages/SyncMessageProcessor.kt b/app/src/main/java/org/thoughtcrime/securesms/messages/SyncMessageProcessor.kt index 398d9bbd37..1af33446ec 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/messages/SyncMessageProcessor.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/messages/SyncMessageProcessor.kt @@ -98,7 +98,6 @@ import org.thoughtcrime.securesms.util.EarlyMessageCacheEntry import org.thoughtcrime.securesms.util.IdentityUtil import org.thoughtcrime.securesms.util.MediaUtil import org.thoughtcrime.securesms.util.MessageConstraintsUtil -import org.thoughtcrime.securesms.util.RemoteConfig import org.thoughtcrime.securesms.util.SignalE164Util import org.thoughtcrime.securesms.util.TextSecurePreferences import org.thoughtcrime.securesms.util.Util @@ -1655,11 +1654,6 @@ object SyncMessageProcessor { } private fun handleSynchronizeAttachmentBackfillRequest(request: SyncMessage.AttachmentBackfillRequest, timestamp: Long) { - if (!RemoteConfig.attachmentBackfillSync) { - warn(timestamp, "[AttachmentBackfillRequest] Remote config not enabled! Skipping.") - return - } - if (request.targetMessage == null || request.targetConversation == null) { warn(timestamp, "[AttachmentBackfillRequest] Target message or target conversation was unset! Can't formulate a response, ignoring.") return diff --git a/app/src/main/java/org/thoughtcrime/securesms/util/RemoteConfig.kt b/app/src/main/java/org/thoughtcrime/securesms/util/RemoteConfig.kt index 8d0503baca..309210ea41 100644 --- a/app/src/main/java/org/thoughtcrime/securesms/util/RemoteConfig.kt +++ b/app/src/main/java/org/thoughtcrime/securesms/util/RemoteConfig.kt @@ -1107,13 +1107,6 @@ object RemoteConfig { hotSwappable = false ) - /** Whether or not this device respect attachment backfill requests. */ - val attachmentBackfillSync: Boolean by remoteBoolean( - key = "android.attachmentBackfillSync", - defaultValue = false, - hotSwappable = true - ) - /** Whether or not libsignal-net's CDSI lookups use the new route-based internals or the old ones */ val libsignalRouteBasedCDSILookup: Boolean by remoteBoolean( key = "android.libsignal.libsignalRouteBasedCDSILookup",