您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

middleware.js 893B

1234567891011121314151617181920212223242526272829303132
  1. import { CONFERENCE_JOINED } from '../base/conference';
  2. import { MiddlewareRegistry } from '../base/redux';
  3. import { setInfoDialogVisibility } from './actions';
  4. import { UPDATE_DIAL_IN_NUMBERS_FAILED } from './actionTypes';
  5. const logger = require('jitsi-meet-logger').getLogger(__filename);
  6. /**
  7. * Middleware that catches actions fetching dial-in numbers.
  8. *
  9. * @param {Store} store - Redux store.
  10. * @returns {Function}
  11. */
  12. // eslint-disable-next-line no-unused-vars
  13. MiddlewareRegistry.register(store => next => action => {
  14. const result = next(action);
  15. switch (action.type) {
  16. case CONFERENCE_JOINED:
  17. store.dispatch(setInfoDialogVisibility(true, true));
  18. break;
  19. case UPDATE_DIAL_IN_NUMBERS_FAILED:
  20. logger.error(
  21. 'Error encountered while fetching dial-in numbers:',
  22. action.error);
  23. break;
  24. }
  25. return result;
  26. });