diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java index 5b97ff650..0b2387651 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java @@ -7,14 +7,9 @@ package org.whispersystems.textsecuregcm.entities; public record UserCapabilities( // TODO: Remove the paymentActivation capability entirely sometime soon after 2024-06-30 - boolean paymentActivation, - // TODO Remove the PNI and PNP capabilities entirely on or after 2024-05-18 - boolean pni, - boolean pnp, - // TODO Remove the giftBadges capability on or after 2024-05-26 - boolean giftBadges) { + boolean paymentActivation) { public UserCapabilities() { - this(true, true, true, true); + this(true); } } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcHelper.java b/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcHelper.java index 3a7f22822..ede2d78f6 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcHelper.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/grpc/ProfileGrpcHelper.java @@ -83,7 +83,6 @@ public class ProfileGrpcHelper { static UserCapabilities buildUserCapabilities(final org.whispersystems.textsecuregcm.entities.UserCapabilities capabilities) { return UserCapabilities.newBuilder() .setPaymentActivation(capabilities.paymentActivation()) - .setPni(capabilities.pni()) .build(); } diff --git a/service/src/main/proto/org/signal/chat/profile.proto b/service/src/main/proto/org/signal/chat/profile.proto index 48f414baa..1f1dab8f8 100644 --- a/service/src/main/proto/org/signal/chat/profile.proto +++ b/service/src/main/proto/org/signal/chat/profile.proto @@ -322,10 +322,6 @@ message UserCapabilities { * Whether all devices linked to the account support MobileCoin payments. */ bool payment_activation = 1; - /** - * Whether all devices linked to the account support phone number privacy. - */ - bool pni = 2; } message Badge { diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/ProfileControllerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/ProfileControllerTest.java index f0f3dbd33..0e2f080bc 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/controllers/ProfileControllerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/controllers/ProfileControllerTest.java @@ -27,7 +27,6 @@ import io.dropwizard.testing.junit5.ResourceExtension; import java.nio.charset.StandardCharsets; import java.security.MessageDigest; import java.security.NoSuchAlgorithmException; -import java.time.Clock; import java.time.Duration; import java.time.Instant; import java.time.temporal.ChronoUnit; @@ -448,7 +447,6 @@ class ProfileControllerTest { .header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD)) .get(BaseProfileResponse.class); - assertThat(profile.getCapabilities().pni()).isTrue(); assertThat(profile.getCapabilities().paymentActivation()).isTrue(); } @@ -932,7 +930,6 @@ class ProfileControllerTest { assertThat(profile.getAboutEmoji()).containsExactly(emoji); assertThat(profile.getAvatar()).isEqualTo("profiles/validavatar"); assertThat(profile.getPhoneNumberSharing()).containsExactly(phoneNumberSharing); - assertThat(profile.getBaseProfileResponse().getCapabilities().pni()).isTrue(); assertThat(profile.getBaseProfileResponse().getUuid()).isEqualTo(new AciServiceIdentifier(AuthHelper.VALID_UUID_TWO)); assertThat(profile.getBaseProfileResponse().getBadges()).hasSize(1).element(0).has(new Condition<>( badge -> "Test Badge".equals(badge.getName()), "has badge with expected name"));