[MM-24177] Adds props to post for front end to know if highlight or not (#14348)
* Add props to post * Address PR comments * address PR comments * Fix styling problems * Address PR comments * address PR comments * Add PR suggestion * fix usage * fix error * remove err * fix golang lint
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3dbb0201a4
Коммит
40b20c3eaf
@@ -396,6 +396,11 @@ func (a *App) FillInPostProps(post *model.Post, channel *model.Channel) *model.A
|
||||
post.DelProp("channel_mentions")
|
||||
}
|
||||
|
||||
matched := model.AT_MENTION_PATTEN.MatchString(post.Message)
|
||||
if a.License() != nil && *a.License().Features.LDAPGroups && matched && !a.HasPermissionToChannel(post.UserId, post.ChannelId, model.PERMISSION_USE_GROUP_MENTIONS) {
|
||||
post.AddProp(model.POST_PROPS_GROUP_HIGHLIGHT_DISABLED, true)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user