[GH-15906][MM-22844] Redesign message notification emails. (#17184)

* Redesign message notification emails.

* Fix tests and linter.

* Fix tests

* Fix tests

* gofmt.

* Fix date separator

* Update html files

* Remove date for message notification email.

* Modify subtitle for mentions and direct and group messages.

* Fix lint error

* Fix DM subtitle.

* Fixing translations

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Co-authored-by: Jesús Espino <jespinog@gmail.com>
Этот коммит содержится в:
Jyoti Patel
2021-05-10 11:50:44 -04:00
коммит произвёл GitHub
родитель bb35a29ed9
Коммит d97daaa1de
22 изменённых файлов: 1265 добавлений и 666 удалений

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

@@ -875,48 +875,11 @@ func getFont(initialFont string) (*truetype.Font, error) {
}
func (a *App) GetProfileImage(user *model.User) ([]byte, bool, *model.AppError) {
if *a.Config().FileSettings.DriverName == "" {
img, appErr := a.GetDefaultProfileImage(user)
if appErr != nil {
return nil, false, appErr
}
return img, false, nil
}
path := "users/" + user.Id + "/profile.png"
data, err := a.ReadFile(path)
if err != nil {
img, appErr := a.GetDefaultProfileImage(user)
if appErr != nil {
return nil, false, appErr
}
if user.LastPictureUpdate == 0 {
if _, err := a.WriteFile(bytes.NewReader(img), path); err != nil {
return nil, false, err
}
}
return img, true, nil
}
return data, false, nil
return a.srv.GetProfileImage(user)
}
func (a *App) GetDefaultProfileImage(user *model.User) ([]byte, *model.AppError) {
var img []byte
var appErr *model.AppError
if user.IsBot {
img = model.BotDefaultImage
appErr = nil
} else {
img, appErr = CreateProfileImage(user.Username, user.Id, *a.Config().FileSettings.InitialFont)
}
if appErr != nil {
return nil, appErr
}
return img, nil
return a.srv.GetDefaultProfileImage(user)
}
func (a *App) SetDefaultProfileImage(user *model.User) *model.AppError {