diff --git a/api4/channel_test.go b/api4/channel_test.go index 86c12f6871..c07ae812b7 100644 --- a/api4/channel_test.go +++ b/api4/channel_test.go @@ -969,15 +969,6 @@ func TestGetAllChannels(t *testing.T) { defer th.TearDown() Client := th.Client - var originalConfigVal bool - th.App.UpdateConfig(func(cfg *model.Config) { - originalConfigVal = *cfg.TeamSettings.ExperimentalViewArchivedChannels - *cfg.TeamSettings.ExperimentalViewArchivedChannels = true - }) - defer th.App.UpdateConfig(func(cfg *model.Config) { - *cfg.TeamSettings.ExperimentalViewArchivedChannels = originalConfigVal - }) - th.TestForSystemAdminAndLocal(t, func(t *testing.T, client *model.Client4) { channels, resp := client.GetAllChannels(0, 20, "") CheckNoError(t, resp) @@ -1265,10 +1256,6 @@ func TestSearchAllChannels(t *testing.T) { }) CheckNoError(t, groupErr) - th.App.UpdateConfig(func(cfg *model.Config) { - *cfg.TeamSettings.ExperimentalViewArchivedChannels = true - }) - testCases := []struct { Description string Search *model.ChannelSearch diff --git a/app/channel.go b/app/channel.go index 01788d9944..14e19ab1dc 100644 --- a/app/channel.go +++ b/app/channel.go @@ -1570,7 +1570,6 @@ func (a *App) GetChannelsForUser(teamId string, userId string, includeDeleted bo } func (a *App) GetAllChannels(page, perPage int, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, *model.AppError) { - opts.IncludeDeleted = *a.Config().TeamSettings.ExperimentalViewArchivedChannels && opts.IncludeDeleted if opts.ExcludeDefaultChannels { opts.ExcludeChannelNames = a.DefaultChannelNames() } @@ -2187,7 +2186,6 @@ func (a *App) AutocompleteChannelsForSearch(teamId string, userId string, term s // SearchAllChannels returns a list of channels, the total count of the results of the search (if the paginate search option is true), and an error. func (a *App) SearchAllChannels(term string, opts model.ChannelSearchOpts) (*model.ChannelListWithTeamData, int64, *model.AppError) { - opts.IncludeDeleted = *a.Config().TeamSettings.ExperimentalViewArchivedChannels && opts.IncludeDeleted if opts.ExcludeDefaultChannels { opts.ExcludeChannelNames = a.DefaultChannelNames() }