From aaba95f9b88b3a235739a76041325cb249e9d541 Mon Sep 17 00:00:00 2001 From: Jonathan Klabunde Tomer <125505367+jkt-signal@users.noreply.github.com> Date: Wed, 27 Sep 2023 10:58:04 -0700 Subject: [PATCH] return `null` for empty username hash in AccountIdentityResponse --- .../textsecuregcm/controllers/AccountController.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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()); }