From d976046e6ad83eff51562168d0da92eebb715ca4 Mon Sep 17 00:00:00 2001 From: Matthew Hodgson Date: Thu, 2 Jun 2016 13:15:13 +0100 Subject: [PATCH] set email branding whenever emails are added from vector --- config.json | 4 ++-- src/components/views/settings/Notifications.js | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/config.json b/config.json index e69cf06cf..7a8661893 100644 --- a/config.json +++ b/config.json @@ -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", "brand": "Vector", - "integrations_ui_url": "http://localhost:8081/", + "integrations_ui_url": "http://localhost:5051/", "integrations_rest_url": "http://localhost:5050" } diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js index a9ff9c0e5..8b283191e 100644 --- a/src/components/views/settings/Notifications.js +++ b/src/components/views/settings/Notifications.js @@ -21,6 +21,7 @@ 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'); @@ -116,7 +117,11 @@ module.exports = React.createClass({ onEnableEmailNotificationsChange: function(address, event) { var emailPusherPromise; if (event.target.checked) { - emailPusherPromise = UserSettingsStore.addEmailPusher(address); + var data = {} + if (configJson.brand) { + data['brand'] = configJson.brand; + } + emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); } else { var emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address); emailPusher.kind = null;