Merge pull request #2678 from matrix-org/travis/fix-email-config

Fix toggle for email notifications
pull/21833/head
Travis Ralston 2019-02-22 08:22:43 -07:00 committed by GitHub
commit a02508023b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@ import {
PushRuleVectorState,
ContentRules,
} from '../../../notifications';
import * as SdkConfig from "../../../SdkConfig";
import SdkConfig from "../../../SdkConfig";
import LabelledToggleSwitch from "../elements/LabelledToggleSwitch";
// TODO: this "view" component still has far too much application logic in it,
@ -132,9 +132,9 @@ module.exports = React.createClass({
});
},
onEnableEmailNotificationsChange: function(address, event) {
onEnableEmailNotificationsChange: function(address, checked) {
let emailPusherPromise;
if (event.target.checked) {
if (checked) {
const data = {};
data['brand'] = SdkConfig.get().brand || 'Riot';
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);