mirror of
https://github.com/SchildiChat/element-web.git
synced 2024-10-01 01:26:12 -04:00
set email branding whenever emails are added from vector
This commit is contained in:
parent
1902b631c7
commit
d976046e6a
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"default_hs_url": "https://matrix.org",
|
"default_hs_url": "http://127.0.0.1:8008",
|
||||||
"default_is_url": "https://vector.im",
|
"default_is_url": "https://vector.im",
|
||||||
"brand": "Vector",
|
"brand": "Vector",
|
||||||
"integrations_ui_url": "http://localhost:8081/",
|
"integrations_ui_url": "http://localhost:5051/",
|
||||||
"integrations_rest_url": "http://localhost:5050"
|
"integrations_rest_url": "http://localhost:5050"
|
||||||
}
|
}
|
||||||
|
@ -21,6 +21,7 @@ var sdk = require('matrix-react-sdk');
|
|||||||
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
var MatrixClientPeg = require('matrix-react-sdk/lib/MatrixClientPeg');
|
||||||
var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore');
|
var UserSettingsStore = require('matrix-react-sdk/lib/UserSettingsStore');
|
||||||
var Modal = require('matrix-react-sdk/lib/Modal');
|
var Modal = require('matrix-react-sdk/lib/Modal');
|
||||||
|
var configJson = require("../../../../config.json");
|
||||||
|
|
||||||
var notifications = require('../../../notifications');
|
var notifications = require('../../../notifications');
|
||||||
|
|
||||||
@ -116,7 +117,11 @@ module.exports = React.createClass({
|
|||||||
onEnableEmailNotificationsChange: function(address, event) {
|
onEnableEmailNotificationsChange: function(address, event) {
|
||||||
var emailPusherPromise;
|
var emailPusherPromise;
|
||||||
if (event.target.checked) {
|
if (event.target.checked) {
|
||||||
emailPusherPromise = UserSettingsStore.addEmailPusher(address);
|
var data = {}
|
||||||
|
if (configJson.brand) {
|
||||||
|
data['brand'] = configJson.brand;
|
||||||
|
}
|
||||||
|
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
|
||||||
} else {
|
} else {
|
||||||
var emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address);
|
var emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address);
|
||||||
emailPusher.kind = null;
|
emailPusher.kind = null;
|
||||||
|
Loading…
Reference in New Issue
Block a user