MM-23015: Enable or disable group mentions (#14010)

* MM-23015: Enable or disable group mentions + show them in suggestion list


Co-authored-by: Catalin Tomai <catalin.tomai@mattermost.com>
Этот коммит содержится в:
catalintomai
2020-04-13 11:37:29 -07:00
коммит произвёл GitHub
родитель 0bfb063c78
Коммит b90f4f46e2
15 изменённых файлов: 777 добавлений и 102 удалений

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

@@ -2990,6 +2990,22 @@ func (s *TimerLayerGroupStore) GetGroupsByChannel(channelId string, opts model.G
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GetGroupsAssociatedToChannelsByTeam(teamId string, opts model.GroupSearchOpts) (map[string][]*model.GroupWithSchemeAdmin, *model.AppError) {
start := timemodule.Now()
resultVar0, resultVar1 := s.GroupStore.GetGroupsAssociatedToChannelsByTeam(teamId, opts)
elapsed := float64(timemodule.Since(start)) / float64(timemodule.Second)
if s.Root.Metrics != nil {
success := "false"
if resultVar1 == nil {
success = "true"
}
s.Root.Metrics.ObserveStoreMethodDuration("GroupStore.GetGroupsAssociatedToChannelsByTeam", success, elapsed)
}
return resultVar0, resultVar1
}
func (s *TimerLayerGroupStore) GetGroupsByTeam(teamId string, opts model.GroupSearchOpts) ([]*model.GroupWithSchemeAdmin, *model.AppError) {
start := timemodule.Now()