diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java index 90fbeb001..785436520 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/controllers/AccountController.java @@ -255,7 +255,7 @@ private AccountIdentityResponse buildAccountIdentityResponse(AccountAndAuthentic return new AccountIdentityResponse(auth.getAccount().getUuid(), auth.getAccount().getNumber(), auth.getAccount().getPhoneNumberIdentifier(), - auth.getAccount().getUsernameHash().orElse(null), + auth.getAccount().getUsernameHash().filter(h -> h.length > 0).orElse(null), auth.getAccount().isStorageSupported()); }