Files
jitsi-meet/react/features/deep-linking/middleware.ts
2023-04-20 12:06:45 +03:00

21 lines
504 B
TypeScript

import MiddlewareRegistry from '../base/redux/MiddlewareRegistry';
import { OPEN_DESKTOP_APP } from './actionTypes';
import { openDesktopApp } from './functions';
/**
* Implements the middleware of the deep linking feature.
*
* @param {Store} store - The redux store.
* @returns {Function}
*/
MiddlewareRegistry.register(store => next => action => {
switch (action.type) {
case OPEN_DESKTOP_APP:
openDesktopApp(store.getState());
break;
}
return next(action);
});