diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/ProfileController.java b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/ProfileController.java index 6fe2d64de..bbae991d4 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/ProfileController.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/ProfileController.java @@ -346,7 +346,6 @@ public class ProfileController { getAcceptableLanguagesForRequest(containerRequestContext), account.getBadges(), isSelf), - isSelf ? account.getUsername().orElse(null) : null, account.getUuid()); } diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/BaseProfileResponse.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/BaseProfileResponse.java index 3782e38c1..1d3a2719c 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/BaseProfileResponse.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/BaseProfileResponse.java @@ -5,9 +5,7 @@ package org.whispersystems.textsecuregcm.entities; -import com.fasterxml.jackson.annotation.JsonCreator; import com.fasterxml.jackson.annotation.JsonProperty; -import javax.annotation.Nullable; import java.util.List; import java.util.UUID; @@ -28,9 +26,6 @@ public class BaseProfileResponse { @JsonProperty private List badges; - @JsonProperty - private String username; - @JsonProperty private UUID uuid; @@ -42,7 +37,6 @@ public class BaseProfileResponse { final boolean unrestrictedUnidentifiedAccess, final UserCapabilities capabilities, final List badges, - @Nullable final String username, final UUID uuid) { this.identityKey = identityKey; @@ -50,7 +44,6 @@ public class BaseProfileResponse { this.unrestrictedUnidentifiedAccess = unrestrictedUnidentifiedAccess; this.capabilities = capabilities; this.badges = badges; - this.username = username; this.uuid = uuid; } @@ -74,10 +67,6 @@ public class BaseProfileResponse { return badges; } - public String getUsername() { - return username; - } - public UUID getUuid() { return uuid; } diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/tests/controllers/ProfileControllerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/tests/controllers/ProfileControllerTest.java index 364c34fbf..ac51fac06 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/tests/controllers/ProfileControllerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/tests/controllers/ProfileControllerTest.java @@ -219,7 +219,6 @@ class ProfileControllerTest { .get(BaseProfileResponse.class); assertThat(profile.getIdentityKey()).isEqualTo("bar"); - assertThat(profile.getUsername()).isNull(); assertThat(profile.getBadges()).hasSize(1).element(0).has(new Condition<>( badge -> "Test Badge".equals(badge.getName()), "has badge with expected name")); @@ -236,7 +235,6 @@ class ProfileControllerTest { .get(BaseProfileResponse.class); assertThat(profile.getIdentityKey()).isEqualTo("bar"); - assertThat(profile.getUsername()).isNull(); assertThat(profile.getUuid()).isEqualTo(AuthHelper.VALID_UUID_TWO); assertThat(profile.getBadges()).hasSize(1).element(0).has(new Condition<>( badge -> "Test Badge".equals(badge.getName()), "has badge with expected name")); @@ -550,7 +548,6 @@ class ProfileControllerTest { assertThat(profile.getAvatar()).isEqualTo("profiles/validavatar"); assertThat(profile.getBaseProfileResponse().getCapabilities().isGv2()).isFalse(); assertThat(profile.getBaseProfileResponse().getCapabilities().isGv1Migration()).isFalse(); - assertThat(profile.getBaseProfileResponse().getUsername()).isNull(); assertThat(profile.getBaseProfileResponse().getUuid()).isEqualTo(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"));