diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-07-22 10:53:57 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-22 10:53:57 -0400 |
commit | 9c2c941449c387b2407d10c101f39a2266a2e65a (patch) | |
tree | 4e4d3455fff32a07a0b9509d82aebdd235e37447 /model | |
parent | 946302d9a29cbf5702da9e18a52b59864a18c69e (diff) | |
download | chat-9c2c941449c387b2407d10c101f39a2266a2e65a.tar.gz chat-9c2c941449c387b2407d10c101f39a2266a2e65a.tar.bz2 chat-9c2c941449c387b2407d10c101f39a2266a2e65a.zip |
PLT-1866/PLT-3509 Added links to download the native apps (#3651)
* PLT-1866 Added configurable links for native app downloads
* PLT-1866 Added native app download link to main menu
* PLT-3509 Added native app link to tutorial
* PLT-3509 Added native app link to welcome email
* PLT-3509 Made link to apps in welcome email conditional on being set
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 4767378fb..b38179cf1 100644 --- a/model/config.go +++ b/model/config.go @@ -268,6 +268,12 @@ type SamlSettings struct { LoginButtonText *string } +type NativeAppSettings struct { + AppDownloadLink *string + AndroidAppDownloadLink *string + IosAppDownloadLink *string +} + type Config struct { ServiceSettings ServiceSettings TeamSettings TeamSettings @@ -285,6 +291,7 @@ type Config struct { ComplianceSettings ComplianceSettings LocalizationSettings LocalizationSettings SamlSettings SamlSettings + NativeAppSettings NativeAppSettings } func (o *Config) ToJson() string { @@ -792,6 +799,21 @@ func (o *Config) SetDefaults() { o.SamlSettings.LocaleAttribute = new(string) *o.SamlSettings.LocaleAttribute = "" } + + if o.NativeAppSettings.AppDownloadLink == nil { + o.NativeAppSettings.AppDownloadLink = new(string) + *o.NativeAppSettings.AppDownloadLink = "https://about.mattermost.com/downloads/" + } + + if o.NativeAppSettings.AndroidAppDownloadLink == nil { + o.NativeAppSettings.AndroidAppDownloadLink = new(string) + *o.NativeAppSettings.AndroidAppDownloadLink = "https://about.mattermost.com/mattermost-android-app/" + } + + if o.NativeAppSettings.IosAppDownloadLink == nil { + o.NativeAppSettings.IosAppDownloadLink = new(string) + *o.NativeAppSettings.IosAppDownloadLink = "https://about.mattermost.com/mattermost-ios-app/" + } } func (o *Config) IsValid() *AppError { |