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.

middleware.js 555B

12345678910111213141516171819202122
  1. import { MiddlewareRegistry } from '../base/redux';
  2. import { LIB_DID_INIT } from '../base/lib-jitsi-meet';
  3. import { initAnalytics } from './functions';
  4. /**
  5. * Middleware which intercepts config actions to handle evaluating analytics
  6. * config based on the config stored in the store.
  7. *
  8. * @param {Store} store - The redux store.
  9. * @returns {Function}
  10. */
  11. MiddlewareRegistry.register(store => next => action => {
  12. switch (action.type) {
  13. case LIB_DID_INIT: {
  14. initAnalytics(store);
  15. break;
  16. }
  17. }
  18. return next(action);
  19. });