summaryrefslogtreecommitdiffstats
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/admin.go6
-rw-r--r--api/api.go2
-rw-r--r--api/context.go57
-rw-r--r--api/team.go4
-rw-r--r--api/templates/email_change_body.html6
-rw-r--r--api/templates/email_change_subject.html2
-rw-r--r--api/templates/email_change_verify_body.html6
-rw-r--r--api/templates/email_change_verify_subject.html2
-rw-r--r--api/templates/error.html4
-rw-r--r--api/templates/find_teams_body.html10
-rw-r--r--api/templates/find_teams_subject.html2
-rw-r--r--api/templates/invite_body.html8
-rw-r--r--api/templates/invite_subject.html2
-rw-r--r--api/templates/password_change_body.html6
-rw-r--r--api/templates/password_change_subject.html2
-rw-r--r--api/templates/post_body.html6
-rw-r--r--api/templates/post_subject.html2
-rw-r--r--api/templates/reset_body.html6
-rw-r--r--api/templates/signup_team_body.html8
-rw-r--r--api/templates/signup_team_subject.html2
-rw-r--r--api/templates/verify_body.html6
-rw-r--r--api/templates/verify_subject.html2
-rw-r--r--api/templates/welcome_body.html2
23 files changed, 91 insertions, 62 deletions
diff --git a/api/admin.go b/api/admin.go
index cd1e5d2de..7a5616ede 100644
--- a/api/admin.go
+++ b/api/admin.go
@@ -24,7 +24,7 @@ func InitAdmin(r *mux.Router) {
sr.Handle("/config", ApiUserRequired(getConfig)).Methods("GET")
sr.Handle("/save_config", ApiUserRequired(saveConfig)).Methods("POST")
sr.Handle("/test_email", ApiUserRequired(testEmail)).Methods("POST")
- sr.Handle("/client_props", ApiAppHandler(getClientProperties)).Methods("GET")
+ sr.Handle("/client_props", ApiAppHandler(getClientConfig)).Methods("GET")
sr.Handle("/log_client", ApiAppHandler(logClient)).Methods("POST")
}
@@ -57,8 +57,8 @@ func getLogs(c *Context, w http.ResponseWriter, r *http.Request) {
w.Write([]byte(model.ArrayToJson(lines)))
}
-func getClientProperties(c *Context, w http.ResponseWriter, r *http.Request) {
- w.Write([]byte(model.MapToJson(utils.ClientProperties)))
+func getClientConfig(c *Context, w http.ResponseWriter, r *http.Request) {
+ w.Write([]byte(model.MapToJson(utils.ClientCfg)))
}
func logClient(c *Context, w http.ResponseWriter, r *http.Request) {
diff --git a/api/api.go b/api/api.go
index 4da1de62d..6c7eda0a2 100644
--- a/api/api.go
+++ b/api/api.go
@@ -20,7 +20,7 @@ func NewServerTemplatePage(templateName string) *ServerTemplatePage {
return &ServerTemplatePage{
TemplateName: templateName,
Props: make(map[string]string),
- ClientProps: utils.ClientProperties,
+ ClientCfg: utils.ClientCfg,
}
}
diff --git a/api/context.go b/api/context.go
index bd9744bf8..67eed674a 100644
--- a/api/context.go
+++ b/api/context.go
@@ -32,7 +32,10 @@ type Context struct {
type Page struct {
TemplateName string
Props map[string]string
- ClientProps map[string]string
+ ClientCfg map[string]string
+ User *model.User
+ Team *model.Team
+ Session *model.Session
}
func ApiAppHandler(h func(*Context, http.ResponseWriter, *http.Request)) http.Handler {
@@ -123,18 +126,7 @@ func (h handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
}
if len(token) != 0 {
- var session *model.Session
- if ts, ok := sessionCache.Get(token); ok {
- session = ts.(*model.Session)
- }
-
- if session == nil {
- if sessionResult := <-Srv.Store.Session().Get(token); sessionResult.Err != nil {
- c.LogError(model.NewAppError("ServeHTTP", "Invalid session", "token="+token+", err="+sessionResult.Err.DetailedError))
- } else {
- session = sessionResult.Data.(*model.Session)
- }
- }
+ session := GetSession(token)
if session == nil || session.IsExpired() {
c.RemoveSessionCookie(w, r)
@@ -479,7 +471,7 @@ func RenderWebError(err *model.AppError, w http.ResponseWriter, r *http.Request)
}
w.WriteHeader(err.StatusCode)
- ServerTemplates.ExecuteTemplate(w, "error.html", Page{Props: props, ClientProps: utils.ClientProperties})
+ ServerTemplates.ExecuteTemplate(w, "error.html", Page{Props: props, ClientCfg: utils.ClientCfg})
}
func Handle404(w http.ResponseWriter, r *http.Request) {
@@ -489,6 +481,43 @@ func Handle404(w http.ResponseWriter, r *http.Request) {
RenderWebError(err, w, r)
}
+func GetSession(token string) *model.Session {
+ var session *model.Session
+ if ts, ok := sessionCache.Get(token); ok {
+ session = ts.(*model.Session)
+ }
+
+ if session == nil {
+ if sessionResult := <-Srv.Store.Session().Get(token); sessionResult.Err != nil {
+ l4g.Error("Invalid session token=" + token + ", err=" + sessionResult.Err.DetailedError)
+ } else {
+ session = sessionResult.Data.(*model.Session)
+ }
+ }
+
+ return session
+}
+
+func FindMultiSessionForTeamId(r *http.Request, teamId string) *model.Session {
+
+ if multiCookie, err := r.Cookie(model.MULTI_SESSION_TOKEN); err == nil {
+ multiToken := multiCookie.Value
+
+ if len(multiToken) > 0 {
+ tokens := strings.Split(multiToken, " ")
+
+ for _, token := range tokens {
+ s := GetSession(token)
+ if s != nil && !s.IsExpired() && s.TeamId == teamId {
+ return s
+ }
+ }
+ }
+ }
+
+ return nil
+}
+
func AddSessionToCache(session *model.Session) {
sessionCache.Add(session.Token, session)
}
diff --git a/api/team.go b/api/team.go
index f6038566a..666fd909b 100644
--- a/api/team.go
+++ b/api/team.go
@@ -431,9 +431,9 @@ func emailTeams(c *Context, w http.ResponseWriter, r *http.Request) {
}
subjectPage := NewServerTemplatePage("find_teams_subject")
- subjectPage.ClientProps["SiteURL"] = c.GetSiteURL()
+ subjectPage.ClientCfg["SiteURL"] = c.GetSiteURL()
bodyPage := NewServerTemplatePage("find_teams_body")
- bodyPage.ClientProps["SiteURL"] = c.GetSiteURL()
+ bodyPage.ClientCfg["SiteURL"] = c.GetSiteURL()
if result := <-Srv.Store.Team().GetTeamsForEmail(email); result.Err != nil {
c.Err = result.Err
diff --git a/api/templates/email_change_body.html b/api/templates/email_change_body.html
index 41fd6e4c3..df2db8730 100644
--- a/api/templates/email_change_body.html
+++ b/api/templates/email_change_body.html
@@ -23,9 +23,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -38,7 +38,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/email_change_subject.html b/api/templates/email_change_subject.html
index 962ae868e..4ff8026f1 100644
--- a/api/templates/email_change_subject.html
+++ b/api/templates/email_change_subject.html
@@ -1 +1 @@
-{{define "email_change_subject"}}[{{.ClientProps.SiteName}}] Your email address has changed for {{.Props.TeamDisplayName}}{{end}}
+{{define "email_change_subject"}}[{{.ClientCfg.SiteName}}] Your email address has changed for {{.Props.TeamDisplayName}}{{end}}
diff --git a/api/templates/email_change_verify_body.html b/api/templates/email_change_verify_body.html
index a9b2a0741..f6bc3bc39 100644
--- a/api/templates/email_change_verify_body.html
+++ b/api/templates/email_change_verify_body.html
@@ -26,9 +26,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -41,7 +41,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/email_change_verify_subject.html b/api/templates/email_change_verify_subject.html
index 5e2ac1452..744aaccfc 100644
--- a/api/templates/email_change_verify_subject.html
+++ b/api/templates/email_change_verify_subject.html
@@ -1 +1 @@
-{{define "email_change_verify_subject"}}[{{.ClientProps.SiteName}}] Verify new email address for {{.Props.TeamDisplayName}}{{end}}
+{{define "email_change_verify_subject"}}[{{.ClientCfg.SiteName}}] Verify new email address for {{.Props.TeamDisplayName}}{{end}}
diff --git a/api/templates/error.html b/api/templates/error.html
index 6b643556e..6944f6c68 100644
--- a/api/templates/error.html
+++ b/api/templates/error.html
@@ -1,7 +1,7 @@
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
- <title>{{ .ClientProps.SiteName }} - Error</title>
+ <title>{{ .ClientCfg.SiteName }} - Error</title>
<link rel="stylesheet" href="/static/css/bootstrap-3.3.5.min.css">
<link rel="stylesheet" href="/static/css/jasny-bootstrap.min.css" rel="stylesheet">
@@ -22,7 +22,7 @@
<div class="container-fluid">
<div class="error__container">
<div class="error__icon"><i class="fa fa-exclamation-triangle"></i></div>
- <h2>{{ .ClientProps.SiteName }} needs your help:</h2>
+ <h2>{{ .ClientCfg.SiteName }} needs your help:</h2>
<p>{{ .Props.Message }}</p>
<a href="{{.Props.SiteURL}}">Go back to team site</a>
</div>
diff --git a/api/templates/find_teams_body.html b/api/templates/find_teams_body.html
index 41f9dac01..4669d51c1 100644
--- a/api/templates/find_teams_body.html
+++ b/api/templates/find_teams_body.html
@@ -9,7 +9,7 @@
<table align="center" border="0" cellpadding="0" cellspacing="0" width="100%" style="border-collapse: collapse;">
<tr>
<td style="padding: 20px 20px 10px; text-align:left;">
- <img src="{{.ClientProps.SiteURL}}/static/images/logo-email.png" width="130px" style="opacity: 0.5" alt="">
+ <img src="{{.ClientCfg.SiteURL}}/static/images/logo-email.png" width="130px" style="opacity: 0.5" alt="">
</td>
</tr>
<tr>
@@ -31,9 +31,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -42,11 +42,11 @@
<tr>
<td style="text-align: center;color: #AAA; font-size: 11px; padding-bottom: 10px;">
<p style="margin: 25px 0;">
- <img width="65" src="{{.ClientProps.SiteURL}}/static/images/circles.png" alt="">
+ <img width="65" src="{{.ClientCfg.SiteURL}}/static/images/circles.png" alt="">
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/find_teams_subject.html b/api/templates/find_teams_subject.html
index 3c2bef589..f3a1437b3 100644
--- a/api/templates/find_teams_subject.html
+++ b/api/templates/find_teams_subject.html
@@ -1 +1 @@
-{{define "find_teams_subject"}}Your {{ .ClientProps.SiteName }} Teams{{end}}
+{{define "find_teams_subject"}}Your {{ .ClientCfg.SiteName }} Teams{{end}}
diff --git a/api/templates/invite_body.html b/api/templates/invite_body.html
index 57feef5d9..930bc099d 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.TeamDisplayName}} started using {{.ClientProps.SiteName}}.<br> The team {{.Props.SenderStatus}} <strong>{{.Props.SenderName}}</strong>, has invited you to join <strong>{{.Props.TeamDisplayName}}</strong>.</p>
+ <p>{{.Props.TeamDisplayName}} started using {{.ClientCfg.SiteName}}.<br> The team {{.Props.SenderStatus}} <strong>{{.Props.SenderName}}</strong>, has invited you to join <strong>{{.Props.TeamDisplayName}}</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>
@@ -26,9 +26,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -41,7 +41,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/invite_subject.html b/api/templates/invite_subject.html
index f46bdcfaf..10f68969f 100644
--- a/api/templates/invite_subject.html
+++ b/api/templates/invite_subject.html
@@ -1 +1 @@
-{{define "invite_subject"}}{{ .Props.SenderName }} invited you to join {{ .Props.TeamDisplayName }} Team on {{.ClientProps.SiteName}}{{end}}
+{{define "invite_subject"}}{{ .Props.SenderName }} invited you to join {{ .Props.TeamDisplayName }} Team on {{.ClientCfg.SiteName}}{{end}}
diff --git a/api/templates/password_change_body.html b/api/templates/password_change_body.html
index 542df4b74..47a93fcb9 100644
--- a/api/templates/password_change_body.html
+++ b/api/templates/password_change_body.html
@@ -23,9 +23,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -38,7 +38,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/password_change_subject.html b/api/templates/password_change_subject.html
index 283fda1af..e7a794090 100644
--- a/api/templates/password_change_subject.html
+++ b/api/templates/password_change_subject.html
@@ -1 +1 @@
-{{define "password_change_subject"}}You updated your password for {{.Props.TeamDisplayName}} on {{ .ClientProps.SiteName }}{{end}}
+{{define "password_change_subject"}}You updated your password for {{.Props.TeamDisplayName}} on {{ .ClientCfg.SiteName }}{{end}}
diff --git a/api/templates/post_body.html b/api/templates/post_body.html
index 63a53bf3c..182134b1a 100644
--- a/api/templates/post_body.html
+++ b/api/templates/post_body.html
@@ -26,9 +26,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -41,7 +41,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/post_subject.html b/api/templates/post_subject.html
index 944cd5a42..f53353d85 100644
--- a/api/templates/post_subject.html
+++ b/api/templates/post_subject.html
@@ -1 +1 @@
-{{define "post_subject"}}[{{.ClientProps.SiteName}}] {{.Props.TeamDisplayName}} Team Notifications for {{.Props.Month}} {{.Props.Day}}, {{.Props.Year}}{{end}}
+{{define "post_subject"}}[{{.ClientCfg.SiteName}}] {{.Props.TeamDisplayName}} Team Notifications for {{.Props.Month}} {{.Props.Day}}, {{.Props.Year}}{{end}}
diff --git a/api/templates/reset_body.html b/api/templates/reset_body.html
index 4bafc57e8..5e5f6cafc 100644
--- a/api/templates/reset_body.html
+++ b/api/templates/reset_body.html
@@ -26,9 +26,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -41,7 +41,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/signup_team_body.html b/api/templates/signup_team_body.html
index dc2cb32ec..6f3deb28b 100644
--- a/api/templates/signup_team_body.html
+++ b/api/templates/signup_team_body.html
@@ -21,14 +21,14 @@
<p style="margin: 20px 0 25px">
<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;">Set up your team</a>
</p>
- {{ .ClientProps.SiteName }} is one place for all your team communication, searchable and available anywhere.<br>You'll get more out of {{ .ClientProps.SiteName }} when your team is in constant communication--let's get them on board.<br></p>
+ {{ .ClientCfg.SiteName }} is one place for all your team communication, searchable and available anywhere.<br>You'll get more out of {{ .ClientCfg.SiteName }} when your team is in constant communication--let's get them on board.<br></p>
</td>
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -41,7 +41,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/signup_team_subject.html b/api/templates/signup_team_subject.html
index 7bc0cc640..236b288fa 100644
--- a/api/templates/signup_team_subject.html
+++ b/api/templates/signup_team_subject.html
@@ -1 +1 @@
-{{define "signup_team_subject"}}Invitation to {{ .ClientProps.SiteName }}{{end}} \ No newline at end of file
+{{define "signup_team_subject"}}Invitation to {{ .ClientCfg.SiteName }}{{end}} \ No newline at end of file
diff --git a/api/templates/verify_body.html b/api/templates/verify_body.html
index 0613b5dd5..a93de9a71 100644
--- a/api/templates/verify_body.html
+++ b/api/templates/verify_body.html
@@ -26,9 +26,9 @@
</tr>
<tr>
<td style="color: #999; padding-top: 20px; line-height: 25px; font-size: 13px;">
- Any questions at all, mail us any time: <a href="mailto:{{.ClientProps.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientProps.FeedbackEmail}}</a>.<br>
+ Any questions at all, mail us any time: <a href="mailto:{{.ClientCfg.FeedbackEmail}}" style="text-decoration: none; color:#2389D7;">{{.ClientCfg.FeedbackEmail}}</a>.<br>
Best wishes,<br>
- The {{.ClientProps.SiteName}} Team<br>
+ The {{.ClientCfg.SiteName}} Team<br>
</td>
</tr>
</table>
@@ -41,7 +41,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>
diff --git a/api/templates/verify_subject.html b/api/templates/verify_subject.html
index 7990df84a..9a3a11282 100644
--- a/api/templates/verify_subject.html
+++ b/api/templates/verify_subject.html
@@ -1 +1 @@
-{{define "verify_subject"}}[{{ .Props.TeamDisplayName }} {{ .ClientProps.SiteName }}] Email Verification{{end}}
+{{define "verify_subject"}}[{{ .Props.TeamDisplayName }} {{ .ClientCfg.SiteName }}] Email Verification{{end}}
diff --git a/api/templates/welcome_body.html b/api/templates/welcome_body.html
index b7cb3704d..485bc6351 100644
--- a/api/templates/welcome_body.html
+++ b/api/templates/welcome_body.html
@@ -43,7 +43,7 @@
</p>
<p style="padding: 0 50px;">
(c) 2015 Mattermost, Inc. 855 El Camino Real, 13A-168, Palo Alto, CA, 94301.<br>
- If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientProps.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
+ If you no longer wish to receive these emails, click on the following link: <a href="mailto:{{.ClientCfg.FeedbackEmail}}?subject=Unsubscribe&body=Unsubscribe" style="text-decoration: none; color:#2389D7;">Unsubscribe</a>
</p>
</td>
</tr>