Merge branch 'develop' into matthew/scalar

This commit is contained in:
Matthew Hodgson 2016-06-19 22:40:58 +01:00
commit 4dfb0e9a90
14 changed files with 220 additions and 74 deletions

View file

@ -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 configJson = require("../../../../config.json");
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,9 +119,7 @@ module.exports = React.createClass({
var emailPusherPromise;
if (event.target.checked) {
var data = {}
if (configJson.brand) {
data['brand'] = configJson.brand;
}
data['brand'] = this.props.brand || 'Vector';
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
} else {
var emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address);