[MM-54933] Add the ability to @ mention custom groups in group constrained teams and channels (#24987)

* add the ability to @ mention custom groups in group constrained teams
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Ben Cooke
2023-11-16 11:24:20 -05:00
коммит произвёл GitHub
родитель bd1c0b7a20
Коммит 2a896f8420
4 изменённых файлов: 95 добавлений и 13 удалений

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

@@ -1151,6 +1151,18 @@ func (a *App) getGroupsAllowedForReferenceInChannel(channel *model.Channel, team
groupsMap[group.Id] = &group.Group
}
}
opts.Source = model.GroupSourceCustom
var customgroups []*model.Group
customgroups, err = a.Srv().Store().Group().GetGroups(0, 0, opts, nil)
if err != nil {
return nil, errors.Wrap(err, "unable to get custom groups")
}
for _, group := range customgroups {
if group.Name != nil {
groupsMap[group.Id] = group
}
}
return groupsMap, nil
}