diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/grpc/DeviceCapabilityUtil.java b/service/src/main/java/org/whispersystems/textsecuregcm/grpc/DeviceCapabilityUtil.java index eba69c5a3..e9ca10c00 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/grpc/DeviceCapabilityUtil.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/grpc/DeviceCapabilityUtil.java @@ -17,8 +17,6 @@ public class DeviceCapabilityUtil { return switch (grpcDeviceCapability) { case DEVICE_CAPABILITY_STORAGE -> DeviceCapability.STORAGE; case DEVICE_CAPABILITY_TRANSFER -> DeviceCapability.TRANSFER; - case DEVICE_CAPABILITY_DELETE_SYNC -> DeviceCapability.DELETE_SYNC; - case DEVICE_CAPABILITY_STORAGE_SERVICE_RECORD_KEY_ROTATION -> DeviceCapability.STORAGE_SERVICE_RECORD_KEY_ROTATION; case DEVICE_CAPABILITY_ATTACHMENT_BACKFILL -> DeviceCapability.ATTACHMENT_BACKFILL; case DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET -> DeviceCapability.SPARSE_POST_QUANTUM_RATCHET; case DEVICE_CAPABILITY_UNSPECIFIED, UNRECOGNIZED -> throw Status.INVALID_ARGUMENT.withDescription("Unrecognized device capability").asRuntimeException(); @@ -29,8 +27,6 @@ public class DeviceCapabilityUtil { return switch (deviceCapability) { case STORAGE -> org.signal.chat.common.DeviceCapability.DEVICE_CAPABILITY_STORAGE; case TRANSFER -> org.signal.chat.common.DeviceCapability.DEVICE_CAPABILITY_TRANSFER; - case DELETE_SYNC -> org.signal.chat.common.DeviceCapability.DEVICE_CAPABILITY_DELETE_SYNC; - case STORAGE_SERVICE_RECORD_KEY_ROTATION -> org.signal.chat.common.DeviceCapability.DEVICE_CAPABILITY_STORAGE_SERVICE_RECORD_KEY_ROTATION; case ATTACHMENT_BACKFILL -> org.signal.chat.common.DeviceCapability.DEVICE_CAPABILITY_ATTACHMENT_BACKFILL; case SPARSE_POST_QUANTUM_RATCHET -> org.signal.chat.common.DeviceCapability.DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET; }; diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/DeviceCapability.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/DeviceCapability.java index 98ca6e4b3..e21e68562 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/DeviceCapability.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/DeviceCapability.java @@ -10,10 +10,6 @@ import java.util.Optional; public enum DeviceCapability { STORAGE("storage", AccountCapabilityMode.ANY_DEVICE, false, false), TRANSFER("transfer", AccountCapabilityMode.PRIMARY_DEVICE, false, false), - @Deprecated(forRemoval = true) // Can be removed sometime after 11/10/2025 - DELETE_SYNC("deleteSync", AccountCapabilityMode.ALWAYS_CAPABLE, true, true), - @Deprecated(forRemoval = true) // Can be removed sometime after 11/10/2025 - STORAGE_SERVICE_RECORD_KEY_ROTATION("ssre2", AccountCapabilityMode.ALWAYS_CAPABLE, true, true), ATTACHMENT_BACKFILL("attachmentBackfill", AccountCapabilityMode.PRIMARY_DEVICE, false, true), SPARSE_POST_QUANTUM_RATCHET("spqr", AccountCapabilityMode.ALL_DEVICES, false, true); diff --git a/service/src/main/proto/org/signal/chat/common.proto b/service/src/main/proto/org/signal/chat/common.proto index 47e09fb33..5bad50990 100644 --- a/service/src/main/proto/org/signal/chat/common.proto +++ b/service/src/main/proto/org/signal/chat/common.proto @@ -97,9 +97,9 @@ enum DeviceCapability { DEVICE_CAPABILITY_UNSPECIFIED = 0; DEVICE_CAPABILITY_STORAGE = 1; DEVICE_CAPABILITY_TRANSFER = 2; - DEVICE_CAPABILITY_DELETE_SYNC = 3; + reserved 3; reserved 4; - DEVICE_CAPABILITY_STORAGE_SERVICE_RECORD_KEY_ROTATION = 5; + reserved 5; DEVICE_CAPABILITY_ATTACHMENT_BACKFILL = 6; DEVICE_CAPABILITY_SPARSE_POST_QUANTUM_RATCHET = 7; } diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/DeviceControllerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/DeviceControllerTest.java index dc1520c06..835bb9b3f 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/DeviceControllerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/DeviceControllerTest.java @@ -830,11 +830,11 @@ class DeviceControllerTest { .request() .header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD)) .header(HttpHeaders.USER_AGENT, "Signal-Android/5.42.8675309 Android/30") - .put(Entity.json("{\"deleteSync\": true, \"notARealDeviceCapability\": true}"))) { + .put(Entity.json("{\"storage\": true, \"notARealDeviceCapability\": true}"))) { assertThat(response.getStatus()).isEqualTo(204); assertThat(response.hasEntity()).isFalse(); - verify(primaryDevice).setCapabilities(Set.of(DeviceCapability.DELETE_SYNC)); + verify(primaryDevice).setCapabilities(Set.of(DeviceCapability.STORAGE)); } } diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/DevicesGrpcServiceTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/DevicesGrpcServiceTest.java index 5bb304eb3..0e19fe785 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/DevicesGrpcServiceTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/DevicesGrpcServiceTest.java @@ -466,10 +466,6 @@ class DevicesGrpcServiceTest extends SimpleBaseGrpcTest