diff --git a/rest/apiv1_controller.go b/rest/apiv1_controller.go index 6cbdf29..365b838 100644 --- a/rest/apiv1_controller.go +++ b/rest/apiv1_controller.go @@ -115,7 +115,7 @@ func MailboxShowV1(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) Header: header.Header, Body: &JSONMessageBodyV1{ Text: mime.Text, - HTML: mime.Html, + HTML: mime.HTML, }, }) } diff --git a/rest/testutils_test.go b/rest/testutils_test.go index d5f49a5..5837e96 100644 --- a/rest/testutils_test.go +++ b/rest/testutils_test.go @@ -36,7 +36,7 @@ func (d *InputMessageData) MockMessage() *MockMessage { msg.On("ReadHeader").Return(gomsg, nil) body := &enmime.MIMEBody{ Text: d.Text, - Html: d.HTML, + HTML: d.HTML, } msg.On("ReadBody").Return(body, nil) return msg diff --git a/webui/mailbox_controller.go b/webui/mailbox_controller.go index 13e9341..bc62d75 100644 --- a/webui/mailbox_controller.go +++ b/webui/mailbox_controller.go @@ -171,13 +171,13 @@ func MailboxShow(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) ( Header: header.Header, Body: &JSONMessageBody{ Text: mime.Text, - HTML: mime.Html, + HTML: mime.HTML, }, }) } body := template.HTML(httpd.TextToHTML(mime.Text)) - htmlAvailable := mime.Html != "" + htmlAvailable := mime.HTML != "" return httpd.RenderPartial("mailbox/_show.html", w, map[string]interface{}{ "ctx": ctx, @@ -252,7 +252,7 @@ func MailboxHTML(w http.ResponseWriter, req *http.Request, ctx *httpd.Context) ( "name": name, "message": message, // TODO: It is not really safe to render, need to sanitize. - "body": template.HTML(mime.Html), + "body": template.HTML(mime.HTML), }) } diff --git a/webui/rest_test.go b/webui/rest_test.go index 891ec2d..ad75cc3 100644 --- a/webui/rest_test.go +++ b/webui/rest_test.go @@ -66,7 +66,7 @@ func (d *InputMessageData) MockMessage() *MockMessage { msg.On("ReadHeader").Return(gomsg, nil) body := &enmime.MIMEBody{ Text: d.Text, - Html: d.HTML, + HTML: d.HTML, } msg.On("ReadBody").Return(body, nil) return msg