From 60edf4835f8d9052d1ad3bf5c96737e47d2626a0 Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Tue, 20 Dec 2022 15:57:46 -0500 Subject: [PATCH] Add a `pni` capability to `UserCapabilities` --- .../textsecuregcm/entities/UserCapabilities.java | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java b/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java index ed315bf37..cf83f53ea 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/entities/UserCapabilities.java @@ -15,7 +15,8 @@ public record UserCapabilities( boolean changeNumber, boolean stories, boolean giftBadges, - boolean paymentActivation) { + boolean paymentActivation, + boolean pni) { public static UserCapabilities createForAccount(Account account) { return new UserCapabilities( @@ -25,6 +26,12 @@ public record UserCapabilities( account.isChangeNumberSupported(), account.isStoriesSupported(), account.isGiftBadgesSupported(), - false); // Hardcode to false until all clients support the flow + + // Hardcode payment activation flag to false until all clients support the flow + false, + + // Although originally intended to indicate that clients support phone number identifiers, the scope of this + // flag has expanded to cover phone number privacy in general + account.isPniSupported()); } }