File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -246,11 +246,9 @@ Crypto.prototype._checkAndStartKeyBackup = async function() {
246
246
247
247
/**
248
248
* Forces a re-check of the key backup and enables/disables it
249
- * as appropriate
250
- *
251
- * @param {object } backupInfo Backup info from /room_keys/version endpoint
249
+ * as appropriate.
252
250
*/
253
- Crypto . prototype . checkKeyBackup = async function ( backupInfo ) {
251
+ Crypto . prototype . checkKeyBackup = async function ( ) {
254
252
this . _checkedForBackup = false ;
255
253
await this . _checkAndStartKeyBackup ( ) ;
256
254
} ;
@@ -1021,6 +1019,9 @@ Crypto.prototype._scheduleKeyBackupSend = async function() {
1021
1019
err . data . errcode == 'M_NOT_FOUND' ||
1022
1020
err . data . errcode == 'M_WRONG_ROOM_KEYS_VERSION'
1023
1021
) {
1022
+ // Re-check key backup status on error, so we can be
1023
+ // sure to present the current situation when asked.
1024
+ await this . checkKeyBackup ( ) ;
1024
1025
// Backup version has changed or this backup version
1025
1026
// has been deleted
1026
1027
this . emit ( "crypto.keyBackupFailed" , err . data . errcode ) ;
You can’t perform that action at this time.
0 commit comments