mirror of https://github.com/vector-im/riot-web
Merge pull request #2678 from matrix-org/travis/fix-email-config
Fix toggle for email notificationspull/21833/head
commit
a02508023b
|
@ -28,7 +28,7 @@ import {
|
||||||
PushRuleVectorState,
|
PushRuleVectorState,
|
||||||
ContentRules,
|
ContentRules,
|
||||||
} from '../../../notifications';
|
} from '../../../notifications';
|
||||||
import * as SdkConfig from "../../../SdkConfig";
|
import SdkConfig from "../../../SdkConfig";
|
||||||
import LabelledToggleSwitch from "../elements/LabelledToggleSwitch";
|
import LabelledToggleSwitch from "../elements/LabelledToggleSwitch";
|
||||||
|
|
||||||
// TODO: this "view" component still has far too much application logic in it,
|
// 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;
|
let emailPusherPromise;
|
||||||
if (event.target.checked) {
|
if (checked) {
|
||||||
const data = {};
|
const data = {};
|
||||||
data['brand'] = SdkConfig.get().brand || 'Riot';
|
data['brand'] = SdkConfig.get().brand || 'Riot';
|
||||||
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
|
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
|
||||||
|
|
Loading…
Reference in New Issue