1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-05 17:02:07 +03:00

Add util to check whether backup key is stored

This commit is contained in:
J. Ryan Stinnett
2019-12-12 14:06:14 +00:00
parent dbab75eae7
commit 72f856eca4

View File

@@ -1475,6 +1475,13 @@ MatrixClient.prototype.prepareKeyBackupVersion = async function(
}; };
}; };
/**
* Check whether the key backup private key is stored in secret storage.
*/
MatrixClient.prototype.isKeyBackupKeyStored = async function() {
return this.isSecretStored("m.megolm_backup.v1", false /* checkKey */);
};
/** /**
* Create a new key backup version and enable it, using the information return * Create a new key backup version and enable it, using the information return
* from prepareKeyBackupVersion. * from prepareKeyBackupVersion.