You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-07-30 04:23:07 +03:00
Clean up megolm-backup integ test (#3631)
* Add `CryptoApi.setDeviceVerified` I need a way to mark devices as trusted for the backup tests. * More tests * Simplify E2EKeyResponder.addDeviceKeys The user and device IDs are in the test data, so no need to pass them in * Clean up key backup integration test Make it use the CryptoApi rather than legacy `MatrixClient.crypto`, and use a pre-signed backup instead of requiring a "blindlySignAnything" method. * run megolm-backup tests on both crypto stacks * avoid internal backupManager
This commit is contained in:
committed by
GitHub
parent
73c9f4e322
commit
83d447adfe
@ -89,12 +89,10 @@ export class E2EKeyResponder {
|
||||
/**
|
||||
* Add a set of device keys for return by a future `/keys/query`, as if they had been `/upload`ed
|
||||
*
|
||||
* @param userId - user the keys belong to
|
||||
* @param deviceId - device the keys belong to
|
||||
* @param keys - device keys for this device.
|
||||
*/
|
||||
public addDeviceKeys(userId: string, deviceId: string, keys: IDeviceKeys) {
|
||||
this.deviceKeysByUserByDevice.getOrCreate(userId).set(deviceId, keys);
|
||||
public addDeviceKeys(keys: IDeviceKeys) {
|
||||
this.deviceKeysByUserByDevice.getOrCreate(keys.user_id).set(keys.device_id, keys);
|
||||
}
|
||||
|
||||
/** Add a set of cross-signing keys for return by a future `/keys/query`, as if they had been `/keys/device_signing/upload`ed
|
||||
|
Reference in New Issue
Block a user