You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-11-26 17:03:12 +03:00
Fix yet more underscored accesses
This commit is contained in:
@@ -408,7 +408,7 @@ describe("MegolmDecryption", function() {
|
||||
"@bob:example.com", BOB_DEVICES,
|
||||
);
|
||||
aliceClient.crypto.deviceList.downloadKeys = async function(userIds) {
|
||||
return this._getDevicesFromStore(userIds);
|
||||
return this.getDevicesFromStore(userIds);
|
||||
};
|
||||
|
||||
let run = false;
|
||||
@@ -512,7 +512,7 @@ describe("MegolmDecryption", function() {
|
||||
"@bob:example.com", BOB_DEVICES,
|
||||
);
|
||||
aliceClient.crypto.deviceList.downloadKeys = async function(userIds) {
|
||||
return this._getDevicesFromStore(userIds);
|
||||
return this.getDevicesFromStore(userIds);
|
||||
};
|
||||
|
||||
aliceClient.claimOneTimeKeys = async () => {
|
||||
|
||||
@@ -222,7 +222,7 @@ describe("Cross Signing", function() {
|
||||
});
|
||||
});
|
||||
|
||||
const deviceInfo = alice.crypto.deviceList._devices["@alice:example.com"]
|
||||
const deviceInfo = alice.crypto.deviceList.devices["@alice:example.com"]
|
||||
.Osborne2;
|
||||
const aliceDevice = {
|
||||
user_id: "@alice:example.com",
|
||||
@@ -444,7 +444,7 @@ describe("Cross Signing", function() {
|
||||
});
|
||||
});
|
||||
|
||||
const deviceInfo = alice.crypto.deviceList._devices["@alice:example.com"]
|
||||
const deviceInfo = alice.crypto.deviceList.devices["@alice:example.com"]
|
||||
.Osborne2;
|
||||
const aliceDevice = {
|
||||
user_id: "@alice:example.com",
|
||||
|
||||
@@ -48,18 +48,18 @@ describe("self-verifications", () => {
|
||||
storeCrossSigningKeyCache: jest.fn(),
|
||||
};
|
||||
|
||||
const _crossSigningInfo = new CrossSigningInfo(
|
||||
const crossSigningInfo = new CrossSigningInfo(
|
||||
userId,
|
||||
{},
|
||||
cacheCallbacks,
|
||||
);
|
||||
_crossSigningInfo.keys = {
|
||||
crossSigningInfo.keys = {
|
||||
master: { keys: { X: testKeyPub } },
|
||||
self_signing: { keys: { X: testKeyPub } },
|
||||
user_signing: { keys: { X: testKeyPub } },
|
||||
};
|
||||
|
||||
const _secretStorage = {
|
||||
const secretStorage = {
|
||||
request: jest.fn().mockReturnValue({
|
||||
promise: Promise.resolve(encodeBase64(testKey)),
|
||||
}),
|
||||
@@ -70,12 +70,12 @@ describe("self-verifications", () => {
|
||||
|
||||
const client = {
|
||||
crypto: {
|
||||
_crossSigningInfo,
|
||||
_secretStorage,
|
||||
crossSigningInfo,
|
||||
secretStorage,
|
||||
storeSessionBackupPrivateKey,
|
||||
getSessionBackupPrivateKey: () => null,
|
||||
},
|
||||
requestSecret: _secretStorage.request.bind(_secretStorage),
|
||||
requestSecret: secretStorage.request.bind(secretStorage),
|
||||
getUserId: () => userId,
|
||||
getKeyBackupVersion: () => Promise.resolve({}),
|
||||
restoreKeyBackupWithCache,
|
||||
@@ -99,7 +99,7 @@ describe("self-verifications", () => {
|
||||
|
||||
/* We should request, and store, 3 cross signing keys and the key backup key */
|
||||
expect(cacheCallbacks.storeCrossSigningKeyCache.mock.calls.length).toBe(3);
|
||||
expect(_secretStorage.request.mock.calls.length).toBe(4);
|
||||
expect(secretStorage.request.mock.calls.length).toBe(4);
|
||||
|
||||
expect(cacheCallbacks.storeCrossSigningKeyCache.mock.calls[0][1])
|
||||
.toEqual(testKey);
|
||||
|
||||
@@ -31,7 +31,7 @@ import { chunkPromises, defer, IDeferred, sleep } from '../utils';
|
||||
import { MatrixClient, CryptoStore } from "../client";
|
||||
import { OlmDevice } from "./OlmDevice";
|
||||
|
||||
/* State transition diagram for DeviceList._deviceTrackingStatus
|
||||
/* State transition diagram for DeviceList.deviceTrackingStatus
|
||||
*
|
||||
* |
|
||||
* stopTrackingDeviceList V
|
||||
@@ -51,7 +51,7 @@ import { OlmDevice } from "./OlmDevice";
|
||||
* +----------------------- UP_TO_DATE ------------------------+
|
||||
*/
|
||||
|
||||
// constants for DeviceList._deviceTrackingStatus
|
||||
// constants for DeviceList.deviceTrackingStatus
|
||||
enum TrackingStatus {
|
||||
NotTracked,
|
||||
PendingDownload,
|
||||
|
||||
Reference in New Issue
Block a user