From d2945cdd77bdf1ee03367a0d45624094fb936c19 Mon Sep 17 00:00:00 2001 From: George Goldberg Date: Wed, 22 Aug 2018 20:12:51 +0100 Subject: MM-11782: Make archived channels experimental and off-by-default. (#9281) * MM-11782: Make archived channels experimental and off-by-default. * Fix test. --- app/channel.go | 4 ++-- app/diagnostics.go | 2 +- app/post.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) (limited to 'app') diff --git a/app/channel.go b/app/channel.go index 4dcab83ee..535eff724 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1498,7 +1498,7 @@ func (a *App) UpdateChannelLastViewedAt(channelIds []string, userId string) *mod } func (a *App) AutocompleteChannels(teamId string, term string) (*model.ChannelList, *model.AppError) { - includeDeleted := *a.Config().TeamSettings.ViewArchivedChannels + includeDeleted := *a.Config().TeamSettings.ExperimentalViewArchivedChannels if result := <-a.Srv.Store.Channel().AutocompleteInTeam(teamId, term, includeDeleted); result.Err != nil { return nil, result.Err @@ -1508,7 +1508,7 @@ func (a *App) AutocompleteChannels(teamId string, term string) (*model.ChannelLi } func (a *App) SearchChannels(teamId string, term string) (*model.ChannelList, *model.AppError) { - includeDeleted := *a.Config().TeamSettings.ViewArchivedChannels + includeDeleted := *a.Config().TeamSettings.ExperimentalViewArchivedChannels if result := <-a.Srv.Store.Channel().SearchInTeam(teamId, term, includeDeleted); result.Err != nil { return nil, result.Err diff --git a/app/diagnostics.go b/app/diagnostics.go index 91341c310..7034fc1a3 100644 --- a/app/diagnostics.go +++ b/app/diagnostics.go @@ -278,7 +278,7 @@ func (a *App) trackConfig() { "max_users_per_team": *cfg.TeamSettings.MaxUsersPerTeam, "max_channels_per_team": *cfg.TeamSettings.MaxChannelsPerTeam, "teammate_name_display": *cfg.TeamSettings.TeammateNameDisplay, - "view_archived_channels": *cfg.TeamSettings.ViewArchivedChannels, + "experimental_view_archived_channels": *cfg.TeamSettings.ExperimentalViewArchivedChannels, "isdefault_site_name": isDefault(cfg.TeamSettings.SiteName, "Mattermost"), "isdefault_custom_brand_text": isDefault(*cfg.TeamSettings.CustomBrandText, model.TEAM_SETTINGS_DEFAULT_CUSTOM_BRAND_TEXT), "isdefault_custom_description_text": isDefault(*cfg.TeamSettings.CustomDescriptionText, model.TEAM_SETTINGS_DEFAULT_CUSTOM_DESCRIPTION_TEXT), diff --git a/app/post.go b/app/post.go index 299c9ce3a..0ce1bbe2d 100644 --- a/app/post.go +++ b/app/post.go @@ -648,7 +648,7 @@ func (a *App) DeletePostFiles(post *model.Post) { func (a *App) SearchPostsInTeam(terms string, userId string, teamId string, isOrSearch bool, includeDeletedChannels bool) (*model.PostSearchResults, *model.AppError) { paramsList := model.ParseSearchParams(terms) - includeDeleted := includeDeletedChannels && *a.Config().TeamSettings.ViewArchivedChannels + includeDeleted := includeDeletedChannels && *a.Config().TeamSettings.ExperimentalViewArchivedChannels esInterface := a.Elasticsearch if license := a.License(); esInterface != nil && *a.Config().ElasticsearchSettings.EnableSearching && license != nil && *license.Features.Elasticsearch { -- cgit v1.2.3-1-g7c22