MM-11782: Make archived channels experimental and off-by-default. (#9281)
* MM-11782: Make archived channels experimental and off-by-default. * Fix test.
Этот коммит содержится в:
коммит произвёл
Carlos Tadeu Panato Junior
родитель
43483805ea
Коммит
d2945cdd77
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Ссылка в новой задаче
Block a user