diff --git a/spec/unit/crypto/algorithms/megolm.spec.js b/spec/unit/crypto/algorithms/megolm.spec.js index 6c6034b72..e7d63c6a2 100644 --- a/spec/unit/crypto/algorithms/megolm.spec.js +++ b/spec/unit/crypto/algorithms/megolm.spec.js @@ -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 () => { diff --git a/spec/unit/crypto/cross-signing.spec.js b/spec/unit/crypto/cross-signing.spec.js index 3118e6365..8638c1f4d 100644 --- a/spec/unit/crypto/cross-signing.spec.js +++ b/spec/unit/crypto/cross-signing.spec.js @@ -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", diff --git a/spec/unit/crypto/verification/secret_request.spec.js b/spec/unit/crypto/verification/secret_request.spec.js index 8c9573273..f261afacf 100644 --- a/spec/unit/crypto/verification/secret_request.spec.js +++ b/spec/unit/crypto/verification/secret_request.spec.js @@ -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); diff --git a/src/crypto/DeviceList.ts b/src/crypto/DeviceList.ts index 3c330994f..f5ec71d1a 100644 --- a/src/crypto/DeviceList.ts +++ b/src/crypto/DeviceList.ts @@ -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,