From 1e40fd750fb104e652172cb854aa3a29b2542ef3 Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 8 Jun 2016 14:55:47 +0100 Subject: [PATCH] Don't use SdkConfig instead take brand from a prop --- src/components/views/settings/Notifications.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index 359802417..771037863 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -21,7 +21,6 @@ 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 SdkConfig = require("matrix-react-sdk/lib/SdkConfig"); var notifications = require('../../../notifications'); @@ -73,6 +72,8 @@ module.exports = React.createClass({ propTypes: { // The array of threepids from the JS SDK (required for email notifications) threepids: React.PropTypes.array.isRequired, + // The brand string set when creating an email pusher + brand: React.PropTypes.string, }, getDefaultProps: function() { @@ -118,8 +119,8 @@ module.exports = React.createClass({ var emailPusherPromise; if (event.target.checked) { var data = {} - if (SdkConfig.get().brand) { - data['brand'] = SdkConfig.get().brand; + if (this.props.brand) { + data['brand'] = this.props.brand; } emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else {