jiti-meet/react/features/mobile/call-integration/reducer.ts

25 lines
778 B
TypeScript
Raw Normal View History

2022-09-05 09:05:07 +00:00
import ReducerRegistry from '../../base/redux/ReducerRegistry';
import { set } from '../../base/redux/functions';
// @ts-ignore
import CallKit from './CallKit';
// eslint-disable-next-line lines-around-comment
2022-09-05 09:05:07 +00:00
// @ts-ignore
import ConnectionService from './ConnectionService';
import { _SET_CALL_INTEGRATION_SUBSCRIPTIONS } from './actionTypes';
export interface ICallIntegrationState {
subscriptions?: any;
}
(CallKit || ConnectionService) && ReducerRegistry.register<ICallIntegrationState>(
'features/call-integration',
(state = {}, action): ICallIntegrationState => {
switch (action.type) {
case _SET_CALL_INTEGRATION_SUBSCRIPTIONS:
return set(state, 'subscriptions', action.subscriptions);
}
return state;
});