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
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
f76fdc99d8
Коммит
c91bcd130d
@@ -786,3 +786,16 @@ func (e *ExplicitMentions) processText(text string, keywords map[string][]string
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (a *App) GetNotificationNameFormat(user *model.User) string {
|
||||
if !*a.Config().PrivacySettings.ShowFullName {
|
||||
return model.SHOW_USERNAME
|
||||
}
|
||||
|
||||
data, err := a.Srv.Store.Preference().Get(user.Id, model.PREFERENCE_CATEGORY_DISPLAY_SETTINGS, model.PREFERENCE_NAME_NAME_FORMAT)
|
||||
if err != nil {
|
||||
return *a.Config().TeamSettings.TeammateNameDisplay
|
||||
}
|
||||
|
||||
return data.Value
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user