diff options
author | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2016-12-22 20:59:04 +0100 |
---|---|---|
committer | enahum <nahumhbl@gmail.com> | 2016-12-22 16:59:04 -0300 |
commit | 768fe6bec344cf4154a39767000c04ce1a5b5a71 (patch) | |
tree | 3712e8c1738b64711eaf7813dbea028d411664f3 /model/config.go | |
parent | 15638d74057552253e0168b252bcdd2eabfa7891 (diff) | |
download | chat-768fe6bec344cf4154a39767000c04ce1a5b5a71.tar.gz chat-768fe6bec344cf4154a39767000c04ce1a5b5a71.tar.bz2 chat-768fe6bec344cf4154a39767000c04ce1a5b5a71.zip |
fix GH-4857 | Add a default value for the FileSettings.InitialFont (#4878)
Diffstat (limited to 'model/config.go')
-rw-r--r-- | model/config.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/model/config.go b/model/config.go index 29fa995fd..c28e02e18 100644 --- a/model/config.go +++ b/model/config.go @@ -391,23 +391,32 @@ func (o *Config) SetDefaults() { // Defaults to "s3.amazonaws.com" o.FileSettings.AmazonS3Endpoint = "s3.amazonaws.com" } + if o.FileSettings.AmazonS3Region == "" { // Defaults to "us-east-1" region. o.FileSettings.AmazonS3Region = "us-east-1" } + if o.FileSettings.AmazonS3SSL == nil { o.FileSettings.AmazonS3SSL = new(bool) *o.FileSettings.AmazonS3SSL = true // Secure by default. } + if o.FileSettings.MaxFileSize == nil { o.FileSettings.MaxFileSize = new(int64) *o.FileSettings.MaxFileSize = 52428800 // 50 MB } + if len(*o.FileSettings.PublicLinkSalt) == 0 { o.FileSettings.PublicLinkSalt = new(string) *o.FileSettings.PublicLinkSalt = NewRandomString(32) } + if o.FileSettings.InitialFont == "" { + // Defaults to "luximbi.ttf" + o.FileSettings.InitialFont = "luximbi.ttf" + } + if len(o.EmailSettings.InviteSalt) == 0 { o.EmailSettings.InviteSalt = NewRandomString(32) } |