diff --git a/react/features/external-api/middleware.js b/react/features/external-api/middleware.js index 21b57ba54..d610a6b37 100644 --- a/react/features/external-api/middleware.js +++ b/react/features/external-api/middleware.js @@ -4,6 +4,7 @@ import { CONFERENCE_FAILED } from '../base/conference'; import { NOTIFY_CAMERA_ERROR, NOTIFY_MIC_ERROR } from '../base/devices'; import { JitsiConferenceErrors } from '../base/lib-jitsi-meet'; import { MiddlewareRegistry } from '../base/redux'; +import { SUBMIT_FEEDBACK } from '../feedback'; declare var APP: Object; @@ -34,6 +35,10 @@ MiddlewareRegistry.register((/* store */) => next => action => { APP.API.notifyOnMicError(action.error.name, action.error.message); } break; + + case SUBMIT_FEEDBACK: + APP.API.notifyFeedbackSubmitted(); + break; } return next(action); diff --git a/react/features/feedback/index.js b/react/features/feedback/index.js index a29aa08e0..b2e9c09f6 100644 --- a/react/features/feedback/index.js +++ b/react/features/feedback/index.js @@ -2,5 +2,4 @@ export * from './actions'; export * from './actionTypes'; export * from './components'; -import './middleware'; import './reducer'; diff --git a/react/features/feedback/middleware.js b/react/features/feedback/middleware.js deleted file mode 100644 index 26b3baa8f..000000000 --- a/react/features/feedback/middleware.js +++ /dev/null @@ -1,26 +0,0 @@ -/* @flow */ - -import { MiddlewareRegistry } from '../base/redux'; - -import { SUBMIT_FEEDBACK } from './actionTypes'; - -declare var APP: Object; - -/** - * Implements the middleware of the feature feedback. - * - * @param {Store} store - The redux store. - * @returns {Function} - */ -// eslint-disable-next-line no-unused-vars -MiddlewareRegistry.register(store => next => action => { - switch (action.type) { - case SUBMIT_FEEDBACK: - if (typeof APP === 'object') { - APP.API.notifyFeedbackSubmitted(); - } - break; - } - - return next(action); -});