You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-09-01 21:21:58 +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);
|
||||
}
|
||||
|
||||
|
@@ -28,7 +28,7 @@ module.exports.MatrixScheduler = require("./scheduler");
|
||||
* ebStorageSessionStore} class */
|
||||
module.exports.WebStorageSessionStore = require("./store/session/webstorage");
|
||||
/** */
|
||||
module.exports.CRYPTO_ENABLED = require("./client").ENABLE_CRYPTO;
|
||||
module.exports.CRYPTO_ENABLED = require("./client").CRYPTO_ENABLED;
|
||||
|
||||
/**
|
||||
* Create a new Matrix Call.
|
||||
|
Reference in New Issue
Block a user