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.

reducer.js 516B

1234567891011121314151617181920212223242526272829
  1. // @flow
  2. import { ReducerRegistry } from '../base/redux';
  3. import { SET_E2EE_KEY } from './actionTypes';
  4. const DEFAULT_STATE = {
  5. /**
  6. * E2EE key.
  7. */
  8. e2eeKey: undefined
  9. };
  10. /**
  11. * Reduces the Redux actions of the feature features/e2ee.
  12. */
  13. ReducerRegistry.register('features/e2ee', (state = DEFAULT_STATE, action) => {
  14. switch (action.type) {
  15. case SET_E2EE_KEY:
  16. return {
  17. ...state,
  18. e2eeKey: action.key
  19. };
  20. default:
  21. return state;
  22. }
  23. });