text: // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
  // See LICENSE.txt for license information.
  
  import {combineReducers} from 'redux';
  
  import {ChannelTypes, UserTypes} from 'matterfoss-redux/action_types';
  
  function channels(state = [], action) {
      switch (action.type) {
      case ChannelTypes.RECEIVED_ALL_CHANNELS:
          return action.data.map((v) => v.id);
      case UserTypes.LOGOUT_SUCCESS:
          return [];
      default:
          return state;
      }
  }
  
  export default combineReducers({
      channels,
  });
  