1
0
mirror of https://github.com/matrix-org/matrix-js-sdk.git synced 2026-01-03 23:22:30 +03:00

Add MatrixClient.initCrypto

initialising the crypto layer needs to become asynchronous. Rather than making
`sdk.createClient` asynchronous, which would break every single app in the
world, add `initCrypto`, which will only break those attempting to do e2e (and
in a way which will fall back to only supporting unencrypted events).
This commit is contained in:
Richard van der Hoff
2017-07-18 21:17:01 +01:00
parent e2599071c5
commit d1e91cd702
6 changed files with 116 additions and 34 deletions

View File

@@ -305,6 +305,10 @@ describe("MatrixClient", function() {
return;
}
beforeEach(function() {
return client.initCrypto();
});
it("should do an HTTP request and then store the keys", function(done) {
const ed25519key = "7wG2lzAqbjcyEkOP7O4gU7ItYcn+chKzh5sT/5r2l78";
// ed25519key = client.getDeviceEd25519Key();