You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-28 05:03:59 +03:00
Add method to force re-check of key backup
Also detect when the key backup version changes and do the right thing https://github.com/vector-im/riot-web/issues/8524
This commit is contained in:
@@ -849,6 +849,19 @@ MatrixClient.prototype.importRoomKeys = function(keys) {
|
||||
return this._crypto.importRoomKeys(keys);
|
||||
};
|
||||
|
||||
/**
|
||||
* Force a re-check of the local key backup status against
|
||||
* what's on the server.
|
||||
*
|
||||
* @returns {Object} Object with backup info (as returned by
|
||||
* getKeyBackupVersion) in backupInfo and
|
||||
* trust information (as returned by isKeyBackupTrusted)
|
||||
* in trustInfo.
|
||||
*/
|
||||
MatrixClient.prototype.checkKeyBackup = function() {
|
||||
return this._crypto.checkKeyBackup();
|
||||
};
|
||||
|
||||
/**
|
||||
* Get information about the current key backup.
|
||||
* @returns {Promise} Information object from API or null
|
||||
|
||||
Reference in New Issue
Block a user