forked from matrix/element-web
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.
This commit is contained in:
parent
c672919d1e
commit
f9aaf7d903
|
@ -21,7 +21,7 @@ var sdk = require('matrix-react-sdk');
|
||||||
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
||||||
var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore');
|
var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore');
|
||||||
var Modal = require('matrix-react-sdk/lib/Modal');
|
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');
|
var notifications = require('../../../notifications');
|
||||||
|
|
||||||
|
@ -118,8 +118,8 @@ module.exports = React.createClass({
|
||||||
var emailPusherPromise;
|
var emailPusherPromise;
|
||||||
if (event.target.checked) {
|
if (event.target.checked) {
|
||||||
var data = {}
|
var data = {}
|
||||||
if (configJson.brand) {
|
if (SdkConfig.get().brand) {
|
||||||
data['brand'] = configJson.brand;
|
data['brand'] = SdkConfig.get().brand;
|
||||||
}
|
}
|
||||||
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
|
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue