2017-05-31 05:24:34 +00:00
|
|
|
import { ReducerRegistry } from '../base/redux';
|
2017-04-20 23:28:03 +00:00
|
|
|
|
|
|
|
import {
|
|
|
|
UPDATE_DIAL_IN_NUMBERS_FAILED,
|
|
|
|
UPDATE_DIAL_IN_NUMBERS_SUCCESS
|
|
|
|
} from './actionTypes';
|
|
|
|
|
|
|
|
const DEFAULT_STATE = {
|
|
|
|
numbersEnabled: true
|
|
|
|
};
|
|
|
|
|
2017-05-31 05:32:13 +00:00
|
|
|
ReducerRegistry.register('features/invite', (state = DEFAULT_STATE, action) => {
|
|
|
|
switch (action.type) {
|
|
|
|
case UPDATE_DIAL_IN_NUMBERS_FAILED:
|
|
|
|
return {
|
|
|
|
...state,
|
|
|
|
error: action.error
|
|
|
|
};
|
2017-04-20 23:28:03 +00:00
|
|
|
|
2017-05-31 05:32:13 +00:00
|
|
|
case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
|
|
|
|
const { numbers, numbersEnabled } = action.dialInNumbers;
|
2017-04-20 23:28:03 +00:00
|
|
|
|
2017-05-31 05:32:13 +00:00
|
|
|
return {
|
|
|
|
conferenceID: action.conferenceID,
|
|
|
|
numbers,
|
|
|
|
numbersEnabled
|
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|
2017-04-20 23:28:03 +00:00
|
|
|
|
2017-05-31 05:32:13 +00:00
|
|
|
return state;
|
|
|
|
});
|