mirror of
https://github.com/vector-im/element-web.git
synced 2025-10-18 19:01:55 +02:00
Merge pull request #2678 from matrix-org/travis/fix-email-config
Fix toggle for email notifications
This commit is contained in:
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…
x
Reference in New Issue
Block a user