MM-52512 fix ability to exclude archived channels in system console (#29122)

This commit is contained in:
Caleb Roseland
2024-12-10 13:28:20 -06:00
committed by GitHub
parent 2c52f09071
commit f1cb9f1ec2

View File

@@ -106,11 +106,11 @@ export default class ChannelList extends React.PureComponent<ChannelListProps, C
this.setState({page, loading: false});
};
searchChannels = async (page = 0, term = '', filters = {}) => {
searchChannels = async (page = 0, term = '', filters: ChannelSearchOpts = {}) => {
let channels = [];
let total = 0;
let searchErrored = true;
const response = await this.props.actions.searchAllChannels(term, {...filters, page, per_page: PAGE_SIZE, include_deleted: true, include_search_by_id: true});
const response = await this.props.actions.searchAllChannels(term, {...filters, page, per_page: PAGE_SIZE, include_deleted: filters.deleted ?? true, include_search_by_id: true});
if (response?.data) {
channels = page > 0 ? this.state.channels.concat(response.data.channels) : response.data.channels;
total = response.data.total_count;