* Removing some other fake apps

* More FakeApp removed

* Removing entirely FakeApp

* Fixing some tests

* Fixing get Cluster id from get plugin status

* Fixing failing tests

* Fixing tests

* Fixing test initialization for web

* Fixing InitServer for server tests

* Fixing InitServer for server tests

* Reverting go.sum and go.mod

* Removing unneded HTMLTemplates function in App layer

* Moving back some functions to its old place to easy the review

* Moving back some functions to its old place to easy the review

* Using the last struct2interface version

* Generating store layers

* Fixing merge problems

* Addressing PR comments

* Small fix

* Fixing app tests build

* Fixing tests

* fixing tests

* Fix tests

* Fixing tests

* Fixing tests

* Fixing tests

* Moving license to server struct

* Adding some fixes to the test compilation

* Fixing cluster and some jobs initialization

* Fixing some license tests compilation problems

* Fixing recursive cache invalidation

* Regenerating app layers

* Fix test compilation

Co-authored-by: mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
Jesús Espino
2020-06-12 13:43:50 +02:00
коммит произвёл GitHub
родитель f3ac33e6dc
Коммит f5eab1271b
88 изменённых файлов: 973 добавлений и 1177 удалений

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

@@ -235,12 +235,12 @@ func (s *Server) sendBatchedEmailNotification(userId string, notifications []*ba
"Day": tm.Day(),
})
body := s.FakeApp().newEmailTemplate("post_batched_body", user.Locale)
body := s.newEmailTemplate("post_batched_body", user.Locale)
body.Props["SiteURL"] = *s.Config().ServiceSettings.SiteURL
body.Props["Posts"] = template.HTML(contents)
body.Props["BodyText"] = translateFunc("api.email_batching.send_batched_email_notification.body_text", len(notifications))
if err := s.FakeApp().sendNotificationMail(user.Email, subject, body.Render()); err != nil {
if err := s.sendNotificationMail(user.Email, subject, body.Render()); err != nil {
mlog.Warn("Unable to send batched email notification", mlog.String("email", user.Email), mlog.Err(err))
}
}
@@ -249,13 +249,13 @@ func (s *Server) renderBatchedPost(notification *batchedNotification, channel *m
// don't include message contents if email notification contents type is set to generic
var template *utils.HTMLTemplate
if emailNotificationContentsType == model.EMAIL_NOTIFICATION_CONTENTS_FULL {
template = s.FakeApp().newEmailTemplate("post_batched_post_full", userLocale)
template = s.newEmailTemplate("post_batched_post_full", userLocale)
} else {
template = s.FakeApp().newEmailTemplate("post_batched_post_generic", userLocale)
template = s.newEmailTemplate("post_batched_post_generic", userLocale)
}
template.Props["Button"] = translateFunc("api.email_batching.render_batched_post.go_to_post")
template.Props["PostMessage"] = s.FakeApp().GetMessageForNotification(notification.post, translateFunc)
template.Props["PostMessage"] = s.GetMessageForNotification(notification.post, translateFunc)
template.Props["PostLink"] = siteURL + "/" + notification.teamName + "/pl/" + notification.post.Id
template.Props["SenderName"] = sender.GetDisplayName(displayNameFormat)