UNPKG

botframework-webchat-component

Version:
21 lines (17 loc) 554 B
import createToastMiddleware from '../../Toast/createToastMiddleware'; function createCoreMiddleware() { return [ () => next => (...args) => { const [ { notification: { id } } ] = args; // We are ignoring "connectivitystatus" notifications, we will render it using <BasicConnectivityStatus> instead. // If devs want to render it, they can add a middleware. return id !== 'connectivitystatus' && next(...args); }, createToastMiddleware() ]; } export default createCoreMiddleware;