Remove stale `pni`, `pnp`, and `giftBadges` capabilities
This commit is contained in:
parent
5b78c0d3e0
commit
f435b612c9
|
@ -7,14 +7,9 @@ package org.whispersystems.textsecuregcm.entities;
|
||||||
|
|
||||||
public record UserCapabilities(
|
public record UserCapabilities(
|
||||||
// TODO: Remove the paymentActivation capability entirely sometime soon after 2024-06-30
|
// TODO: Remove the paymentActivation capability entirely sometime soon after 2024-06-30
|
||||||
boolean paymentActivation,
|
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) {
|
|
||||||
|
|
||||||
public UserCapabilities() {
|
public UserCapabilities() {
|
||||||
this(true, true, true, true);
|
this(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,6 @@ public class ProfileGrpcHelper {
|
||||||
static UserCapabilities buildUserCapabilities(final org.whispersystems.textsecuregcm.entities.UserCapabilities capabilities) {
|
static UserCapabilities buildUserCapabilities(final org.whispersystems.textsecuregcm.entities.UserCapabilities capabilities) {
|
||||||
return UserCapabilities.newBuilder()
|
return UserCapabilities.newBuilder()
|
||||||
.setPaymentActivation(capabilities.paymentActivation())
|
.setPaymentActivation(capabilities.paymentActivation())
|
||||||
.setPni(capabilities.pni())
|
|
||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -322,10 +322,6 @@ message UserCapabilities {
|
||||||
* Whether all devices linked to the account support MobileCoin payments.
|
* Whether all devices linked to the account support MobileCoin payments.
|
||||||
*/
|
*/
|
||||||
bool payment_activation = 1;
|
bool payment_activation = 1;
|
||||||
/**
|
|
||||||
* Whether all devices linked to the account support phone number privacy.
|
|
||||||
*/
|
|
||||||
bool pni = 2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
message Badge {
|
message Badge {
|
||||||
|
|
|
@ -27,7 +27,6 @@ import io.dropwizard.testing.junit5.ResourceExtension;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.security.MessageDigest;
|
import java.security.MessageDigest;
|
||||||
import java.security.NoSuchAlgorithmException;
|
import java.security.NoSuchAlgorithmException;
|
||||||
import java.time.Clock;
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.Instant;
|
import java.time.Instant;
|
||||||
import java.time.temporal.ChronoUnit;
|
import java.time.temporal.ChronoUnit;
|
||||||
|
@ -448,7 +447,6 @@ class ProfileControllerTest {
|
||||||
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
|
.header("Authorization", AuthHelper.getAuthHeader(AuthHelper.VALID_UUID, AuthHelper.VALID_PASSWORD))
|
||||||
.get(BaseProfileResponse.class);
|
.get(BaseProfileResponse.class);
|
||||||
|
|
||||||
assertThat(profile.getCapabilities().pni()).isTrue();
|
|
||||||
assertThat(profile.getCapabilities().paymentActivation()).isTrue();
|
assertThat(profile.getCapabilities().paymentActivation()).isTrue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -932,7 +930,6 @@ class ProfileControllerTest {
|
||||||
assertThat(profile.getAboutEmoji()).containsExactly(emoji);
|
assertThat(profile.getAboutEmoji()).containsExactly(emoji);
|
||||||
assertThat(profile.getAvatar()).isEqualTo("profiles/validavatar");
|
assertThat(profile.getAvatar()).isEqualTo("profiles/validavatar");
|
||||||
assertThat(profile.getPhoneNumberSharing()).containsExactly(phoneNumberSharing);
|
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().getUuid()).isEqualTo(new AciServiceIdentifier(AuthHelper.VALID_UUID_TWO));
|
||||||
assertThat(profile.getBaseProfileResponse().getBadges()).hasSize(1).element(0).has(new Condition<>(
|
assertThat(profile.getBaseProfileResponse().getBadges()).hasSize(1).element(0).has(new Condition<>(
|
||||||
badge -> "Test Badge".equals(badge.getName()), "has badge with expected name"));
|
badge -> "Test Badge".equals(badge.getName()), "has badge with expected name"));
|
||||||
|
|
Loading…
Reference in New Issue