snapshot of https://github.com/jitsi/jitsi-meet.git @ fd1749dd28f4138aa80234fc7f311b19aaffa0e7 (2026-09-15)
This commit is contained in:
44
react/features/e2ee/reducer.ts
Normal file
44
react/features/e2ee/reducer.ts
Normal file
@@ -0,0 +1,44 @@
|
||||
import ReducerRegistry from '../base/redux/ReducerRegistry';
|
||||
|
||||
import {
|
||||
SET_MAX_MODE,
|
||||
TOGGLE_E2EE
|
||||
} from './actionTypes';
|
||||
import { MAX_MODE } from './constants';
|
||||
|
||||
const DEFAULT_STATE = {
|
||||
enabled: false,
|
||||
maxMode: MAX_MODE.DISABLED
|
||||
};
|
||||
|
||||
export interface IE2EEState {
|
||||
enabled: boolean;
|
||||
maxMode: string;
|
||||
}
|
||||
|
||||
export interface ISas {
|
||||
emoji: Array<string>;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reduces the Redux actions of the feature features/e2ee.
|
||||
*/
|
||||
ReducerRegistry.register<IE2EEState>('features/e2ee', (state = DEFAULT_STATE, action): IE2EEState => {
|
||||
switch (action.type) {
|
||||
case TOGGLE_E2EE:
|
||||
return {
|
||||
...state,
|
||||
enabled: action.enabled
|
||||
};
|
||||
|
||||
case SET_MAX_MODE: {
|
||||
return {
|
||||
...state,
|
||||
maxMode: action.maxMode
|
||||
};
|
||||
}
|
||||
|
||||
default:
|
||||
return state;
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user