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

add unit test and minor fixes

This commit is contained in:
Hubert Chathi
2021-05-31 21:52:20 -04:00
parent 07bfa5532e
commit c543358826
2 changed files with 19 additions and 1 deletions

View File

@@ -238,6 +238,8 @@ export class BackupManager {
}
/**
* Check if the given backup info is trusted.
*
* @param {object} backupInfo key backup info dict from /room_keys/version
* @return {object} {
* usable: [bool], // is the backup trusted, true iff there is a sig that is valid & from a trusted device
@@ -351,7 +353,7 @@ export class BackupManager {
)
);
});
ret.usable ||= ret.trusted_locally;
ret.usable = ret.usable || ret.trusted_locally;
return ret;
}