mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 08:11:16 +01:00 
			
		
		
		
	Don't use SdkConfig
instead take brand from a prop
This commit is contained in:
		
							parent
							
								
									ed1554f4af
								
							
						
					
					
						commit
						1e40fd750f
					
				| @ -21,7 +21,6 @@ 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 SdkConfig = require("matrix-react-sdk/lib/SdkConfig"); |  | ||||||
| 
 | 
 | ||||||
| var notifications = require('../../../notifications'); | var notifications = require('../../../notifications'); | ||||||
| 
 | 
 | ||||||
| @ -73,6 +72,8 @@ module.exports = React.createClass({ | |||||||
|     propTypes: { |     propTypes: { | ||||||
|         // The array of threepids from the JS SDK (required for email notifications)
 |         // The array of threepids from the JS SDK (required for email notifications)
 | ||||||
|         threepids: React.PropTypes.array.isRequired, |         threepids: React.PropTypes.array.isRequired, | ||||||
|  |         // The brand string set when creating an email pusher
 | ||||||
|  |         brand: React.PropTypes.string, | ||||||
|     }, |     }, | ||||||
| 
 | 
 | ||||||
|     getDefaultProps: function() { |     getDefaultProps: function() { | ||||||
| @ -118,8 +119,8 @@ module.exports = React.createClass({ | |||||||
|         var emailPusherPromise; |         var emailPusherPromise; | ||||||
|         if (event.target.checked) { |         if (event.target.checked) { | ||||||
|             var data = {} |             var data = {} | ||||||
|             if (SdkConfig.get().brand) { |             if (this.props.brand) { | ||||||
|                 data['brand'] = SdkConfig.get().brand; |                 data['brand'] = this.props.brand; | ||||||
|             } |             } | ||||||
|             emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); |             emailPusherPromise = UserSettingsStore.addEmailPusher(address, data); | ||||||
|         } else { |         } else { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user