diff options
author | KN4CK3R <admin@oldschoolhack.me> | 2022-08-08 20:04:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-08 20:04:28 +0200 |
commit | 2b101994a6f4724500908226f9a55816062f1da6 (patch) | |
tree | c13f682c0a3be130a5ee29a919ef292c41efee95 /services/mailer/mail.go | |
parent | ccf03e19c275057cf9b9c86f3ecfbc1fd60008f5 (diff) | |
download | gitea-2b101994a6f4724500908226f9a55816062f1da6.tar.gz gitea-2b101994a6f4724500908226f9a55816062f1da6.zip |
Fix init mail render logic (#20704)
This bug affects tests which are sending emails (#20307). Some tests reinitialise the web routes (like `TestNodeinfo`) which messed up the mail templates. There is no reason why the templates should be loaded in the routes method.
Diffstat (limited to 'services/mailer/mail.go')
-rw-r--r-- | services/mailer/mail.go | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/services/mailer/mail.go b/services/mailer/mail.go index b8d79bd818..738a207ce8 100644 --- a/services/mailer/mail.go +++ b/services/mailer/mail.go @@ -55,12 +55,6 @@ var ( subjectRemoveSpaces = regexp.MustCompile(`[\s]+`) ) -// InitMailRender initializes the mail renderer -func InitMailRender(subjectTpl *texttmpl.Template, bodyTpl *template.Template) { - subjectTemplates = subjectTpl - bodyTemplates = bodyTpl -} - // SendTestMail sends a test mail func SendTestMail(email string) error { if setting.MailService == nil { |