jiti-meet/react/features/talk-while-muted/reducer.ts

22 lines
606 B
TypeScript
Raw Normal View History

2022-09-01 11:00:49 +00:00
import ReducerRegistry from '../base/redux/ReducerRegistry';
import { set } from '../base/redux/functions';
import { SET_CURRENT_NOTIFICATION_UID } from './actionTypes';
2022-09-01 11:00:49 +00:00
export interface ITalkWhileMutedState {
currentNotificationUid?: string;
2022-09-01 11:00:49 +00:00
}
/**
* Reduces the redux actions of the feature talk while muted.
*/
2022-09-05 09:05:07 +00:00
ReducerRegistry.register<ITalkWhileMutedState>('features/talk-while-muted',
(state = {}, action): ITalkWhileMutedState => {
switch (action.type) {
case SET_CURRENT_NOTIFICATION_UID:
return set(state, 'currentNotificationUid', action.uid);
}
return state;
});