0
0
mirror of https://github.com/signalapp/Signal-Server.git synced 2024-09-20 03:52:16 +02:00

Remove stale pni, pnp, and giftBadges capabilities

This commit is contained in:
Katherine 2024-06-12 13:42:18 -04:00 committed by GitHub
parent 5b78c0d3e0
commit f435b612c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 2 additions and 15 deletions

View File

@ -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);
}
}

View File

@ -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();
}

View File

@ -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 {

View File

@ -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"));