announcements: fix [] on {{ .username }}

pull/163/head
Harvey Tindall 3 years ago
parent 25a8d3807e
commit f763cfb53a
No known key found for this signature in database
GPG Key ID: BBC65952848FB1A2

@ -355,7 +355,7 @@ func (emailer *Emailer) constructTemplate(subject, md string, app *appContext, u
"md": md, "md": md,
} }
if len(username) != 0 { if len(username) != 0 {
data["username"] = username data["username"] = username[0]
} }
email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "template_email", "email_", data) email.HTML, email.Text, email.Markdown, err = emailer.construct(app, "template_email", "email_", data)
if err != nil { if err != nil {

Loading…
Cancel
Save