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 удалений

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

@@ -109,12 +109,7 @@ func (a *App) sendPushNotification(notification *postNotification, user *model.U
channel := notification.channel
post := notification.post
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, user.Id)
senderName := notification.GetSenderName(nameFormat, *cfg.ServiceSettings.EnablePostUsernameOverride)