You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-19 16:42:09 +03:00
Enable crypto if olm is present
This commit is contained in:
@@ -20,8 +20,11 @@ var utils = require("./utils");
|
||||
|
||||
var CRYPTO_ENABLED = false;
|
||||
|
||||
if (CRYPTO_ENABLED) {
|
||||
try {
|
||||
var Olm = require("olm");
|
||||
CRYPTO_ENABLED = true;
|
||||
} catch (e) {
|
||||
// Olm not installed.
|
||||
}
|
||||
|
||||
// TODO:
|
||||
@@ -1799,7 +1802,7 @@ MatrixClient.prototype.startClient = function(historyLen) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (this.sessionStore !== null) {
|
||||
if (CRYPTO_ENABLED && this.sessionStore !== null) {
|
||||
this.uploadKeys(5);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user