You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { ReducerRegistry } from '../base/redux';
  2. import {
  3. SET_INFO_DIALOG_VISIBILITY,
  4. UPDATE_DIAL_IN_NUMBERS_FAILED,
  5. UPDATE_DIAL_IN_NUMBERS_SUCCESS
  6. } from './actionTypes';
  7. const DEFAULT_STATE = {
  8. numbersEnabled: true
  9. };
  10. ReducerRegistry.register('features/invite', (state = DEFAULT_STATE, action) => {
  11. switch (action.type) {
  12. case SET_INFO_DIALOG_VISIBILITY:
  13. return {
  14. ...state,
  15. infoDialogVisible: action.visible,
  16. infoDialogWillAutoClose: action.autoClose
  17. };
  18. case UPDATE_DIAL_IN_NUMBERS_FAILED:
  19. return {
  20. ...state,
  21. error: action.error
  22. };
  23. case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
  24. const { numbers, numbersEnabled } = action.dialInNumbers;
  25. return {
  26. conferenceID: action.conferenceID,
  27. numbers,
  28. numbersEnabled
  29. };
  30. }
  31. }
  32. return state;
  33. });