You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-29 16:43:09 +03:00
Schedule key upload on enabling backup
This ensures a partially completed backup will continue to make progress.
This commit is contained in:
@@ -843,6 +843,10 @@ MatrixClient.prototype.enableKeyBackup = function(info) {
|
||||
this._crypto.backupKey.set_recipient_key(info.auth_data.public_key);
|
||||
|
||||
this.emit('crypto.keyBackupStatus', true);
|
||||
|
||||
// There may be keys left over from a partially completed backup, so
|
||||
// schedule a send to check.
|
||||
this._crypto.scheduleKeyBackupSend();
|
||||
};
|
||||
|
||||
/**
|
||||
|
||||
@@ -989,7 +989,7 @@ Crypto.prototype.importRoomKeys = function(keys) {
|
||||
* Schedules sending all keys waiting to be sent to the backup, if not already
|
||||
* scheduled. Retries if necessary.
|
||||
*/
|
||||
Crypto.prototype._scheduleKeyBackupSend = async function() {
|
||||
Crypto.prototype.scheduleKeyBackupSend = async function() {
|
||||
if (this._sendingBackups) return;
|
||||
|
||||
try {
|
||||
@@ -1115,7 +1115,7 @@ Crypto.prototype.backupGroupSession = async function(
|
||||
|
||||
// don't wait for this to complete: it will delay so
|
||||
// happens in the background
|
||||
this._scheduleKeyBackupSend();
|
||||
this.scheduleKeyBackupSend();
|
||||
};
|
||||
|
||||
Crypto.prototype.backupAllGroupSessions = async function(version) {
|
||||
|
||||
Reference in New Issue
Block a user