Making private some methods that are not needed publicly (#13959)

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2020-03-03 22:43:48 +01:00
коммит произвёл GitHub
родитель ccc57e56c3
Коммит c9a0418a32
19 изменённых файлов: 182 добавлений и 224 удалений

Просмотреть файл

@@ -99,7 +99,7 @@ func (a *App) sendNotificationEmail(notification *PostNotification, user *model.
var bodyText = a.getNotificationEmailBody(user, post, channel, channelName, senderName, team.Name, landingURL, emailNotificationContentsType, useMilitaryTime, translateFunc)
a.Srv().Go(func() {
if err := a.SendNotificationMail(user.Email, html.UnescapeString(subjectText), bodyText); err != nil {
if err := a.sendNotificationMail(user.Email, html.UnescapeString(subjectText), bodyText); err != nil {
mlog.Error("Error while sending the email", mlog.String("user_email", user.Email), mlog.Err(err))
}
})
@@ -166,13 +166,13 @@ func (a *App) getNotificationEmailBody(recipient *model.User, post *model.Post,
// only include message contents in notification email if email notification contents type is set to full
var bodyPage *utils.HTMLTemplate
if emailNotificationContentsType == model.EMAIL_NOTIFICATION_CONTENTS_FULL {
bodyPage = a.NewEmailTemplate("post_body_full", recipient.Locale)
bodyPage = a.newEmailTemplate("post_body_full", recipient.Locale)
postMessage := a.GetMessageForNotification(post, translateFunc)
postMessage = html.EscapeString(postMessage)
normalizedPostMessage := a.generateHyperlinkForChannels(postMessage, teamName, landingURL)
bodyPage.Props["PostMessage"] = template.HTML(normalizedPostMessage)
} else {
bodyPage = a.NewEmailTemplate("post_body_generic", recipient.Locale)
bodyPage = a.newEmailTemplate("post_body_generic", recipient.Locale)
}
bodyPage.Props["SiteURL"] = a.GetSiteURL()