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
Put error constant on the class
This commit is contained in:
@@ -1093,7 +1093,7 @@ MatrixClient.prototype.isValidRecoveryKey = function(recoveryKey) {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
MatrixClient.prototype.RESTORE_BACKUP_ERROR_BAD_KEY = 'RESTORE_BACKUP_ERROR_BAD_KEY';
|
MatrixClient.RESTORE_BACKUP_ERROR_BAD_KEY = 'RESTORE_BACKUP_ERROR_BAD_KEY';
|
||||||
|
|
||||||
MatrixClient.prototype.restoreKeyBackupWithPassword = async function(
|
MatrixClient.prototype.restoreKeyBackupWithPassword = async function(
|
||||||
password, targetRoomId, targetSessionId, backupInfo,
|
password, targetRoomId, targetSessionId, backupInfo,
|
||||||
@@ -1139,7 +1139,7 @@ MatrixClient.prototype._restoreKeyBackup = function(
|
|||||||
// doesn't match the one in the auth_data, the user has enetered
|
// doesn't match the one in the auth_data, the user has enetered
|
||||||
// a different recovery key / the wrong passphrase.
|
// a different recovery key / the wrong passphrase.
|
||||||
if (backupPubKey !== backupInfo.auth_data.public_key) {
|
if (backupPubKey !== backupInfo.auth_data.public_key) {
|
||||||
return Promise.reject({errcode: this.RESTORE_BACKUP_ERROR_BAD_KEY});
|
return Promise.reject({errcode: MatrixClient.RESTORE_BACKUP_ERROR_BAD_KEY});
|
||||||
}
|
}
|
||||||
|
|
||||||
return this._http.authedRequest(
|
return this._http.authedRequest(
|
||||||
|
|||||||
Reference in New Issue
Block a user