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.

123456789101112131415161718192021222324
  1. import ReducerRegistry from '../../base/redux/ReducerRegistry';
  2. import { set } from '../../base/redux/functions';
  3. // @ts-ignore
  4. import CallKit from './CallKit';
  5. // eslint-disable-next-line lines-around-comment
  6. // @ts-ignore
  7. import ConnectionService from './ConnectionService';
  8. import { _SET_CALL_INTEGRATION_SUBSCRIPTIONS } from './actionTypes';
  9. export interface ICallIntegrationState {
  10. subscriptions?: any;
  11. }
  12. (CallKit || ConnectionService) && ReducerRegistry.register<ICallIntegrationState>(
  13. 'features/call-integration',
  14. (state = {}, action): ICallIntegrationState => {
  15. switch (action.type) {
  16. case _SET_CALL_INTEGRATION_SUBSCRIPTIONS:
  17. return set(state, 'subscriptions', action.subscriptions);
  18. }
  19. return state;
  20. });