Add versionedExpirationTimer capability

This commit is contained in:
Katherine
2024-08-21 11:39:43 -04:00
committed by GitHub
parent fa51793379
commit 4c0a5ac3b2
20 changed files with 139 additions and 37 deletions

View File

@@ -8,11 +8,13 @@ package org.whispersystems.textsecuregcm.entities;
import org.whispersystems.textsecuregcm.storage.Account;
public record UserCapabilities(
// TODO: Remove the paymentActivation capability entirely sometime soon after 2024-06-30
// TODO: Remove the paymentActivation capability entirely sometime soon after 2024-10-07
boolean paymentActivation,
boolean deleteSync) {
boolean deleteSync,
boolean versionedExpirationTimer) {
public static UserCapabilities createForAccount(final Account account) {
return new UserCapabilities(true, account.isDeleteSyncSupported());
return new UserCapabilities(true, account.isDeleteSyncSupported(),
account.isVersionedExpirationTimerSupported());
}
}