MM-18126 Respect show full name config setting in push and email notifications (#11996)

* Respect show full name config setting in push and email notifications

* Style fix
Этот коммит содержится в:
Joram Wilander
2019-09-03 10:33:49 -04:00
коммит произвёл GitHub
родитель f76fdc99d8
Коммит c91bcd130d
4 изменённых файлов: 38 добавлений и 12 удалений

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

@@ -74,12 +74,7 @@ func (a *App) sendNotificationEmail(notification *postNotification, user *model.
useMilitaryTime = data.Value == "true"
}
var nameFormat string
if data, err := a.Srv.Store.Preference().Get(user.Id, model.PREFERENCE_CATEGORY_DISPLAY_SETTINGS, model.PREFERENCE_NAME_NAME_FORMAT); err != nil {
nameFormat = *a.Config().TeamSettings.TeammateNameDisplay
} else {
nameFormat = data.Value
}
nameFormat := a.GetNotificationNameFormat(user)
channelName := notification.GetChannelName(nameFormat, "")
senderName := notification.GetSenderName(nameFormat, *a.Config().ServiceSettings.EnablePostUsernameOverride)