diff options
author | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-06-29 09:42:12 -0700 |
---|---|---|
committer | Reed Garmsen <rgarmsen2295@gmail.com> | 2015-06-29 09:42:12 -0700 |
commit | 6cfccf63d5e3c7cf3a8ff8795c8f1e63e63cfbf0 (patch) | |
tree | 24c8bf423986d7ecd8c9b3a180207d17023e129d /api | |
parent | 0792eb18d535410b456f3cc569e243efb85a47b6 (diff) | |
download | chat-6cfccf63d5e3c7cf3a8ff8795c8f1e63e63cfbf0.tar.gz chat-6cfccf63d5e3c7cf3a8ff8795c8f1e63e63cfbf0.tar.bz2 chat-6cfccf63d5e3c7cf3a8ff8795c8f1e63e63cfbf0.zip |
Changed invite email to reflect the sender's status in the team (e.g. admin v.s. plain member)
Diffstat (limited to 'api')
-rw-r--r-- | api/team.go | 9 | ||||
-rw-r--r-- | api/templates/invite_body.html | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/api/team.go b/api/team.go index 775bc29ae..24b7ec9e1 100644 --- a/api/team.go +++ b/api/team.go @@ -488,12 +488,21 @@ func InviteMembers(team *model.Team, user *model.User, invites []string) { } else { sender = user.FullName } + + senderRole := "" + if strings.Contains(user.Roles, model.ROLE_ADMIN) || strings.Contains(user.Roles, model.ROLE_SYSTEM_ADMIN) { + senderRole = "administrator" + } else { + senderRole = "member" + } + subjectPage := NewServerTemplatePage("invite_subject", teamUrl) subjectPage.Props["SenderName"] = sender subjectPage.Props["TeamName"] = team.Name bodyPage := NewServerTemplatePage("invite_body", teamUrl) bodyPage.Props["TeamName"] = team.Name bodyPage.Props["SenderName"] = sender + bodyPage.Props["SenderStatus"] = senderRole bodyPage.Props["Email"] = invite diff --git a/api/templates/invite_body.html b/api/templates/invite_body.html index 06f48759c..8be2ac0df 100644 --- a/api/templates/invite_body.html +++ b/api/templates/invite_body.html @@ -18,7 +18,7 @@ <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> - <p>{{.Props.TeamName}} started using {{.SiteName}}.<br> The team administrator <strong>{{.Props.SenderName}}</strong>, has invited you to join <strong>{{.Props.TeamName}}</strong>.</p> + <p>{{.Props.TeamName}} started using {{.SiteName}}.<br> The team {{.Props.SenderStatus}} <strong>{{.Props.SenderName}}</strong>, has invited you to join <strong>{{.Props.TeamName}}</strong>.</p> <p style="margin: 20px 0 15px"> <a href="{{.Props.Link}}" 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;">Join Team</a> </p> |