diff options
author | George Goldberg <george@gberg.me> | 2018-08-22 20:12:51 +0100 |
---|---|---|
committer | Carlos Tadeu Panato Junior <ctadeu@gmail.com> | 2018-08-22 21:12:51 +0200 |
commit | d2945cdd77bdf1ee03367a0d45624094fb936c19 (patch) | |
tree | 7289f0a5d85b7c37e1fe5bf02cb40ab30623d0fa /app | |
parent | 43483805eabcb36ef9018f12a82a6d3ac055baf5 (diff) | |
download | chat-d2945cdd77bdf1ee03367a0d45624094fb936c19.tar.gz chat-d2945cdd77bdf1ee03367a0d45624094fb936c19.tar.bz2 chat-d2945cdd77bdf1ee03367a0d45624094fb936c19.zip |
MM-11782: Make archived channels experimental and off-by-default. (#9281)
* MM-11782: Make archived channels experimental and off-by-default.
* Fix test.
Diffstat (limited to 'app')
-rw-r--r-- | app/channel.go | 4 | ||||
-rw-r--r-- | app/diagnostics.go | 2 | ||||
-rw-r--r-- | app/post.go | 2 |
3 files changed, 4 insertions, 4 deletions
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 { |