loading up the forgejo repo on tangled to test page performance
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

[MAIL] Use correct function in mail footer

- Regression of #4635
- The authentication mails weren't being sent with links to the
instance, because the the wrong variable was used in the mail footer.
`$.AppUrl` should've been `AppUrl`.
- Unit test added.

Gusted 685a903c 2285526e

+3 -1
+2
services/mailer/mail_auth_test.go
··· 10 10 "code.gitea.io/gitea/models/unittest" 11 11 user_model "code.gitea.io/gitea/models/user" 12 12 "code.gitea.io/gitea/modules/optional" 13 + "code.gitea.io/gitea/modules/setting" 13 14 "code.gitea.io/gitea/modules/translation" 14 15 "code.gitea.io/gitea/services/mailer" 15 16 user_service "code.gitea.io/gitea/services/user" ··· 49 50 assert.Equal(t, user.EmailTo(firstEmail.Email), msgs[0].To) 50 51 assert.EqualValues(t, translation.NewLocale("en-US").Tr("mail.primary_mail_change.subject"), msgs[0].Subject) 51 52 assert.Contains(t, msgs[0].Body, secondEmail.Email) 53 + assert.Contains(t, msgs[0].Body, setting.AppURL) 52 54 mailer.AssertTranslatedLocale(t, msgs[0].Body, "mail.primary_mail_change.text_1", "mail.primary_mail_change.text_2", "mail.primary_mail_change.text_3") 53 55 called = true 54 56 })()
+1 -1
templates/mail/common/footer_simple.tmpl
··· 1 - <p><a target="_blank" rel="noopener noreferrer" href="{{$.AppUrl}}">{{AppName}}</a></p> 1 + <p><a target="_blank" rel="noopener noreferrer" href="{{AppUrl}}">{{AppName}}</a></p>