1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2025-12-01 04:43:29 +03:00

Update to new API

Also fix test & remove debug logging from test
This commit is contained in:
David Baker
2018-11-16 14:46:18 +00:00
parent c53c6a94d7
commit d99a22d68d
2 changed files with 2 additions and 3 deletions

View File

@@ -69,6 +69,7 @@ describe("Crypto", function() {
mockBaseApis = {
sendToDevice: expect.createSpy(),
getKeyBackupVersion: expect.createSpy(),
};
mockRoomList = {};
@@ -111,9 +112,7 @@ describe("Crypto", function() {
getSender: expect.createSpy().andReturn('@bob:home.server'),
});
console.log("waiting");
await prom;
console.log("done");
});
});
});

View File

@@ -1459,7 +1459,7 @@ Crypto.prototype._onToDeviceBadEncrypted = async function(event) {
// on a current session.
// Note that an undecryptable message from another device could easily be spoofed -
// is there anything we can do to mitigate this?
const device = this._deviceList.getDeviceByIdentityKey(sender, algorithm, deviceKey);
const device = this._deviceList.getDeviceByIdentityKey(algorithm, deviceKey);
const devicesByUser = {};
devicesByUser[sender] = [device];
await olmlib.ensureOlmSessionsForDevices(