From d84453049611abb69839462120fe3145f744bebf Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 5 Jan 2026 13:59:37 -0500 Subject: [PATCH] Fix copyright date and address for email footers (#34813) * Fix copyright date and address for email footers * Update footer for email template --- e2e-tests/cypress/tests/utils/email.js | 10 +++++----- server/channels/app/email/email.go | 5 +++-- server/i18n/en.json | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/e2e-tests/cypress/tests/utils/email.js b/e2e-tests/cypress/tests/utils/email.js index 86eb0fc09f3..c15a4537475 100644 --- a/e2e-tests/cypress/tests/utils/email.js +++ b/e2e-tests/cypress/tests/utils/email.js @@ -37,7 +37,7 @@ export function getJoinEmailTemplate(sender, userEmail, team, isGuest = false) { 'Mattermost is a flexible, open source messaging platform that enables secure team collaboration.', 'Learn more ( mattermost.com )', '', - '© 2022 Mattermost, Inc. 530 Lytton Avenue, Second floor, Palo Alto, CA, 94301', + `© 2015 - ${new Date().getFullYear()} Mattermost, Inc. 2100 Geng Road, Suite 210, Palo Alto, CA, 94303`, ]; } @@ -59,7 +59,7 @@ export function getMentionEmailTemplate(sender, message, postId, siteName, teamN 'Want to change your notifications settings?', `Login to ${siteName} ( ${baseUrl} ) and go to Settings > Notifications`, '', - '© 2022 Mattermost, Inc. 530 Lytton Avenue, Second floor, Palo Alto, CA, 94301', + `© 2015 - ${new Date().getFullYear()} Mattermost, Inc. 2100 Geng Road, Suite 210, Palo Alto, CA, 94303`, ]; } @@ -74,7 +74,7 @@ export function getPasswordResetEmailTemplate() { '', 'The password reset link expires in 24 hours.', '', - '© 2022 Mattermost, Inc. 530 Lytton Avenue, Second floor, Palo Alto, CA, 94301', + `© 2015 - ${new Date().getFullYear()} Mattermost, Inc. 2100 Geng Road, Suite 210, Palo Alto, CA, 94303`, ]; } @@ -91,7 +91,7 @@ export function getEmailVerifyEmailTemplate(userEmail) { 'This email address was used to create an account with Mattermost.', 'If it was not you, you can safely ignore this email.', '', - '© 2022 Mattermost, Inc. 530 Lytton Avenue, Second floor, Palo Alto, CA, 94301', + `© 2015 - ${new Date().getFullYear()} Mattermost, Inc. 2100 Geng Road, Suite 210, Palo Alto, CA, 94303`, ]; } @@ -113,7 +113,7 @@ export function getWelcomeEmailTemplate(userEmail, siteName, teamName) { '', 'Download ( https://mattermost.com/pl/download-apps )', '', - '© 2022 Mattermost, Inc. 530 Lytton Avenue, Second floor, Palo Alto, CA, 94301', + `© 2015 - ${new Date().getFullYear()} Mattermost, Inc. 2100 Geng Road, Suite 210, Palo Alto, CA, 94303`, ]; } diff --git a/server/channels/app/email/email.go b/server/channels/app/email/email.go index d8d223ee590..2698aceb698 100644 --- a/server/channels/app/email/email.go +++ b/server/channels/app/email/email.go @@ -12,6 +12,7 @@ import ( "net/http" "net/url" "strings" + "time" "github.com/pkg/errors" @@ -78,7 +79,7 @@ func (es *Service) SendEmailChangeVerifyEmail(newUserEmail, locale, siteURL, tok data.Props["QuestionTitle"] = T("api.templates.questions_footer.title") data.Props["EmailInfo1"] = T("api.templates.email_us_anytime_at") data.Props["SupportEmail"] = "feedback@mattermost.com" - data.Props["FooterV2"] = T("api.templates.email_footer_v2") + data.Props["FooterV2"] = T("api.templates.email_footer_v2", map[string]any{"CurrentYear": time.Now().Year()}) body, err := es.templatesContainer.RenderToString("email_change_verify_body", data) if err != nil { @@ -859,7 +860,7 @@ func (es *Service) NewEmailTemplateData(locale string) templates.Data { map[string]any{"SiteName": es.config().TeamSettings.SiteName}), "SupportEmail": *es.config().SupportSettings.SupportEmail, "Footer": localT("api.templates.email_footer"), - "FooterV2": localT("api.templates.email_footer_v2"), + "FooterV2": localT("api.templates.email_footer_v2", map[string]any{"CurrentYear": time.Now().Year()}), "Organization": organization, }, HTML: map[string]template.HTML{}, diff --git a/server/i18n/en.json b/server/i18n/en.json index 84dd36f4edd..fdf800f9bd4 100644 --- a/server/i18n/en.json +++ b/server/i18n/en.json @@ -3708,7 +3708,7 @@ }, { "id": "api.templates.email_footer_v2", - "translation": "© 2022 Mattermost, Inc. 530 Lytton Avenue, Second floor, Palo Alto, CA, 94301" + "translation": "© 2015 - {{ .CurrentYear }} Mattermost, Inc. 2100 Geng Road, Suite 210, Palo Alto, CA, 94303" }, { "id": "api.templates.email_info1",