Files
jitsi-meet/react/features/invite/reducer.js
Leonard Kim 47c07c2e76 feat(invite): Add conference id to dial-in numbers display
DialInNumbersForm has been modified to display a conference id to be used for
dialing into the conference. The changes include:
- Requesting the conference id and adding the conference id to the redux store
- Displaying the conference id in DialInNumbersForm
- Modifying the copy behavior to support copying the new message to clipboard
- DialInNumbersForm does not display until all ajax requests have completed
  successfully. This eliminates the need for the REQUESTING state.
2017-05-17 10:25:07 -07:00

39 lines
839 B
JavaScript

import {
ReducerRegistry
} from '../base/redux';
import {
UPDATE_DIAL_IN_NUMBERS_FAILED,
UPDATE_DIAL_IN_NUMBERS_SUCCESS
} from './actionTypes';
const DEFAULT_STATE = {
numbersEnabled: true
};
ReducerRegistry.register(
'features/invite/dial-in',
(state = DEFAULT_STATE, action) => {
switch (action.type) {
case UPDATE_DIAL_IN_NUMBERS_FAILED: {
return {
...state,
error: action.error
};
}
case UPDATE_DIAL_IN_NUMBERS_SUCCESS: {
const { numbers, numbersEnabled } = action.dialInNumbers;
return {
conferenceId: action.conferenceId.id,
error: null,
numbers,
numbersEnabled
};
}
}
return state;
});