diff options
Diffstat (limited to 'api')
-rw-r--r-- | api/file.go | 18 | ||||
-rw-r--r-- | api/templates/verify_body.html | 2 | ||||
-rw-r--r-- | api/templates/welcome_body.html | 4 |
3 files changed, 19 insertions, 5 deletions
diff --git a/api/file.go b/api/file.go index d31abfb1d..67ebc14b7 100644 --- a/api/file.go +++ b/api/file.go @@ -522,7 +522,7 @@ func writeFile(f []byte, path string) *model.AppError { auth.AccessKey = utils.Cfg.FileSettings.AmazonS3AccessKeyId auth.SecretKey = utils.Cfg.FileSettings.AmazonS3SecretAccessKey - s := s3.New(auth, aws.Regions[utils.Cfg.FileSettings.AmazonS3Region]) + s := s3.New(auth, awsRegion()) bucket := s.Bucket(utils.Cfg.FileSettings.AmazonS3Bucket) ext := filepath.Ext(path) @@ -562,7 +562,7 @@ func readFile(path string) ([]byte, *model.AppError) { auth.AccessKey = utils.Cfg.FileSettings.AmazonS3AccessKeyId auth.SecretKey = utils.Cfg.FileSettings.AmazonS3SecretAccessKey - s := s3.New(auth, aws.Regions[utils.Cfg.FileSettings.AmazonS3Region]) + s := s3.New(auth, awsRegion()) bucket := s.Bucket(utils.Cfg.FileSettings.AmazonS3Bucket) // try to get the file from S3 with some basic retry logic @@ -613,3 +613,17 @@ func openFileWriteStream(path string) (io.Writer, *model.AppError) { func closeFileWriteStream(file io.Writer) { file.(*os.File).Close() } + +func awsRegion() aws.Region { + if region, ok := aws.Regions[utils.Cfg.FileSettings.AmazonS3Region]; ok { + return region + } + + return aws.Region{ + Name: utils.Cfg.FileSettings.AmazonS3Region, + S3Endpoint: utils.Cfg.FileSettings.AmazonS3Endpoint, + S3BucketEndpoint: utils.Cfg.FileSettings.AmazonS3BucketEndpoint, + S3LocationConstraint: *utils.Cfg.FileSettings.AmazonS3LocationConstraint, + S3LowercaseBucket: *utils.Cfg.FileSettings.AmazonS3LowercaseBucket, + } +} diff --git a/api/templates/verify_body.html b/api/templates/verify_body.html index 97571d9e3..c42b2a372 100644 --- a/api/templates/verify_body.html +++ b/api/templates/verify_body.html @@ -17,7 +17,7 @@ <table border="0" cellpadding="0" cellspacing="0" style="padding: 20px 50px 0; text-align: center; margin: 0 auto"> <tr> <td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;"> - <h2 style="font-weight: normal; margin-top: 10px;">You've been invited</h2> + <h2 style="font-weight: normal; margin-top: 10px;">You've joined the {{ .Props.TeamDisplayName }} team</h2> <p>Please verify your email address by clicking below.</p> <p style="margin: 20px 0 15px"> <a href="{{.Props.VerifyUrl}}" style="background: #2389D7; border-radius: 3px; color: #fff; border: none; outline: none; min-width: 200px; padding: 15px 25px; font-size: 14px; font-family: inherit; cursor: pointer; -webkit-appearance: none;text-decoration: none;">Verify Email</a> diff --git a/api/templates/welcome_body.html b/api/templates/welcome_body.html index dbb94cf06..71d838b08 100644 --- a/api/templates/welcome_body.html +++ b/api/templates/welcome_body.html @@ -18,7 +18,7 @@ {{if .Props.VerifyUrl }} <tr> <td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;"> - <h2 style="font-weight: normal; margin-top: 10px;">You've been invited</h2> + <h2 style="font-weight: normal; margin-top: 10px;">You've joined the {{ .Props.TeamDisplayName }} team</h2> <p>Please verify your email address by clicking below.</p> <p style="margin: 20px 0 15px"> <a href="{{.Props.VerifyUrl}}" style="background: #2389D7; border-radius: 3px; color: #fff; border: none; outline: none; min-width: 200px; padding: 15px 25px; font-size: 14px; font-family: inherit; cursor: pointer; -webkit-appearance: none;text-decoration: none;">Verify Email</a> @@ -28,7 +28,7 @@ {{end}} <tr> <td style="border-bottom: 1px solid #ddd; padding: 0 0 20px;"> - <h2 style="font-weight: normal; margin-top: 10px;">You can sign-in to your new team from the web address:</h2> + <h2 style="font-weight: normal; margin-top: 25px; line-height: 1.5;">You can sign-in to your new team from the web address:</h2> <a href="{{.Props.TeamURL}}">{{.Props.TeamURL}}</a> <p>Mattermost lets you share messages and files from your PC or phone, with instant search and archiving.</p> </td> |