GraphQL: Create dedicated top-level filter for sidebar categories (#20353)

We add the excludeTeam switch to allow user to get
all sidebar categories from other teams excluding a given team.

```release-note
NONE
```
Этот коммит содержится в:
Agniva De Sarker
2022-06-28 20:28:50 +05:30
коммит произвёл GitHub
родитель ade2271442
Коммит bd6acf04a9
23 изменённых файлов: 724 добавлений и 280 удалений

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

@@ -804,7 +804,11 @@ func (a *App) JoinUserToTeam(c *request.Context, team *model.Team, user *model.U
return nil, model.NewAppError("JoinUserToTeam", "app.user.update_update.app_error", nil, err.Error(), http.StatusInternalServerError)
}
if _, err := a.createInitialSidebarCategories(user.Id, team.Id); err != nil {
opts := &store.SidebarCategorySearchOpts{
TeamID: team.Id,
ExcludeTeam: false,
}
if _, err := a.createInitialSidebarCategories(user.Id, opts); err != nil {
mlog.Warn(
"Encountered an issue creating default sidebar categories.",
mlog.String("user_id", user.Id),