From 40889a1337f2e20ec975d710a3fd9ed5df7d2022 Mon Sep 17 00:00:00 2001 From: Chris Eager Date: Tue, 22 Sep 2026 16:03:22 -0400 Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20require=20PROFILES=5FV2=20capab?= =?UTF-8?q?ility=20to=20call=20setProfile=20rpc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../textsecuregcm/grpc/ProfileGrpcService.java | 8 -------- .../src/main/proto/org/signal/chat/profile.proto | 6 +----- .../grpc/ProfileGrpcServiceTest.java | 16 ---------------- 3 files changed, 1 insertion(+), 29 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcService.java b/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcService.java index 55068948b..fa8fc2219 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcService.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcService.java @@ -26,7 +26,6 @@ import org.signal.chat.profile.GetAvatarCredentialsResponse; import org.signal.chat.profile.GetProfileRequest; import org.signal.chat.profile.GetProfileResponse; import org.signal.chat.profile.PaymentsForbiddenInRegion; -import org.signal.chat.profile.ProfilesV2CapabilityRequired; import org.signal.chat.profile.SetProfileRequest; import org.signal.chat.profile.SetProfileResponse; import org.signal.chat.profile.SetProfileResult; @@ -54,7 +53,6 @@ import org.whispersystems.textsecuregcm.s3.PostPolicyGenerator; import org.whispersystems.textsecuregcm.storage.Account; import org.whispersystems.textsecuregcm.storage.AccountBadge; import org.whispersystems.textsecuregcm.storage.AccountsManager; -import org.whispersystems.textsecuregcm.storage.DeviceCapability; import org.whispersystems.textsecuregcm.storage.DynamicConfigurationManager; import org.whispersystems.textsecuregcm.storage.ProfilesManager; import org.whispersystems.textsecuregcm.storage.VersionedProfile; @@ -111,12 +109,6 @@ public class ProfileGrpcService extends SimpleProfileGrpc.ProfileImplBase { final Account account = accountsManager.getByAccountIdentifier(authenticatedDevice.accountIdentifier()) .orElseThrow(() -> GrpcExceptions.invalidCredentials("invalid credentials")); - if (!account.hasCapability(DeviceCapability.PROFILES_V2)) { - return SetProfileResponse.newBuilder() - .setProfilesV2CapabilityRequired(ProfilesV2CapabilityRequired.getDefaultInstance()) - .build(); - } - validateRequest(request); final byte[] expectedCurrentVersion = request.getExpectedCurrentVersion().toByteArray(); diff --git a/service/src/main/proto/org/signal/chat/profile.proto b/service/src/main/proto/org/signal/chat/profile.proto index 384c642bd..886ce40be 100644 --- a/service/src/main/proto/org/signal/chat/profile.proto +++ b/service/src/main/proto/org/signal/chat/profile.proto @@ -189,11 +189,7 @@ message SetProfileResponse { // another device on the account may have created a new version the caller does not know about. errors.FailedPrecondition expected_version_write_conflict = 4 [(tag.reason) = "expected_version_write_conflict"]; - // Because this is a temporary field during the migration, it has the highest - // field number without serialization overhead. This is purely aesthetic. - ProfilesV2CapabilityRequired profiles_v2_capability_required = 15 [(tag.reason) = "profiles_v2_capability_required"]; - - // next: 4 + // next: 5 } } diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java index 43c9ab455..c8b90b78c 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcServiceTest.java @@ -362,22 +362,6 @@ public class ProfileGrpcServiceTest extends SimpleBaseGrpcTest