Enforce Secure Backup completion when requested by HS

This removes all buttons to escape the Secure Backup setup flow when the
matching `.well-known` setting is set by homeserver.

Part of https://github.com/vector-im/element-web/issues/14954
This commit is contained in:
J. Ryan Stinnett 2020-08-14 18:06:35 +01:00
parent 941cbc47c8
commit 1932505d3b
3 changed files with 23 additions and 5 deletions

View file

@ -33,3 +33,8 @@ export function getE2EEWellKnown(): IE2EEWellKnown {
}
return null;
}
export function isSecureBackupRequired(): boolean {
const wellKnown = getE2EEWellKnown();
return wellKnown && wellKnown["secure_backup_required"] === true;
}