[MM-28447] Avoid "ghost mentions" when "First Name" is not set, but "First Name trigger mention" setting is set (#15577)
* Do not add any keyword regarding first name if the first name is not set * Add test Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
c392f993d6
Коммит
9449d0e302
@@ -873,7 +873,7 @@ func addMentionKeywordsForUser(keywords map[string][]string, profile *model.User
|
||||
}
|
||||
|
||||
// If turned on, add the user's case sensitive first name
|
||||
if profile.NotifyProps[model.FIRST_NAME_NOTIFY_PROP] == "true" {
|
||||
if profile.NotifyProps[model.FIRST_NAME_NOTIFY_PROP] == "true" && profile.FirstName != "" {
|
||||
keywords[profile.FirstName] = append(keywords[profile.FirstName], profile.Id)
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user