Introduce a `pnp` capability for backward compatibility

This commit is contained in:
Jon Chambers 2024-02-18 17:09:45 -05:00 committed by Jon Chambers
parent 36f85fc97e
commit 11e6ff1bbe
1 changed files with 4 additions and 3 deletions

View File

@ -8,10 +8,11 @@ package org.whispersystems.textsecuregcm.entities;
import org.whispersystems.textsecuregcm.storage.Account; import org.whispersystems.textsecuregcm.storage.Account;
public record UserCapabilities(boolean paymentActivation, public record UserCapabilities(boolean paymentActivation,
// TODO Remove the PNI capability entirely on or after 2024-05-14 // TODO Remove the PNI and PNP capabilities entirely on or after 2024-05-18
boolean pni) { boolean pni,
boolean pnp) {
public static UserCapabilities createForAccount(final Account account) { public static UserCapabilities createForAccount(final Account account) {
return new UserCapabilities(account.isPaymentActivationSupported(), true); return new UserCapabilities(account.isPaymentActivationSupported(), true, true);
} }
} }