From f9aaf7d9030ca46fe779d1485fdb5e5c45321fd1 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 6 Jun 2016 19:13:30 +0100 Subject: [PATCH] Use the SdkConfig interface rather than pulling in config.json directly. json-loader appears to still be necessary due to some horrendous json dependency in the depths of sanitize-html. --- src/components/views/settings/Notifications.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 8b283191..35980241 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -21,7 +21,7 @@ var sdk = require('matrix-react-sdk'); var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg'); var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore'); var Modal = require('matrix-react-sdk/lib/Modal'); -var configJson = require("../../../../config.json"); +var SdkConfig = require("matrix-react-sdk/lib/SdkConfig"); var notifications = require('../../../notifications'); @@ -118,8 +118,8 @@ module.exports = React.createClass({ var emailPusherPromise; if (event.target.checked) { var data = {} - if (configJson.brand) { - data['brand'] = configJson.brand; + if (SdkConfig.get().brand) { + data['brand'] = SdkConfig.get().brand; } emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else {