Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Consistent middleware and reducer imports

Lyubomir Marinov55a8b4422445
diff --git a/react/features/app/actions.js b/react/features/app/actions.js
index 90cadb597f..a2898cad4f 100644
--- a/react/features/app/actions.js
+++ b/react/features/app/actions.js
@@ -8,7 +8,6 @@ import {
_parseURIString,
init
} from './functions';
-import './reducer';
/**
* Temporary solution. Should dispatch actions related to initial settings of
diff --git a/react/features/app/index.js b/react/features/app/index.js
index b845e8859c..5d564613e6 100644
--- a/react/features/app/index.js
+++ b/react/features/app/index.js
@@ -2,3 +2,5 @@ export * from './actions';
export * from './actionTypes';
export * from './components';
export * from './functions';
+
+import './reducer';
diff --git a/react/features/background/actions.js b/react/features/background/actions.js
index 92fbffed1a..e0ddf4136f 100644
--- a/react/features/background/actions.js
+++ b/react/features/background/actions.js
@@ -5,8 +5,6 @@ import {
_SET_BACKGROUND_VIDEO_MUTED,
APP_STATE_CHANGED
} from './actionTypes';
-import './middleware';
-import './reducer';
/**
* Signals that the App state has changed (in terms of execution state). The
diff --git a/react/features/background/index.js b/react/features/background/index.js
index e40f04336c..f3a2aac65c 100644
--- a/react/features/background/index.js
+++ b/react/features/background/index.js
@@ -1,2 +1,5 @@
export * from './actions';
export * from './actionTypes';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/base/conference/actions.js b/react/features/base/conference/actions.js
index bb21022679..d544183e46 100644
--- a/react/features/base/conference/actions.js
+++ b/react/features/base/conference/actions.js
@@ -20,8 +20,6 @@ import {
} from './actionTypes';
import { EMAIL_COMMAND } from './constants';
import { _addLocalTracksToConference } from './functions';
-import './middleware';
-import './reducer';
/**
* Adds conference (event) listeners.
diff --git a/react/features/base/conference/index.js b/react/features/base/conference/index.js
index 08fe9014b1..969667b3a4 100644
--- a/react/features/base/conference/index.js
+++ b/react/features/base/conference/index.js
@@ -1,3 +1,6 @@
export * from './actions';
export * from './actionTypes';
export * from './functions';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/base/connection/actions.native.js b/react/features/base/connection/actions.native.js
index 77f8671b21..c6084c3fb3 100644
--- a/react/features/base/connection/actions.native.js
+++ b/react/features/base/connection/actions.native.js
@@ -11,7 +11,6 @@ import {
CONNECTION_FAILED,
SET_DOMAIN
} from './actionTypes';
-import './reducer';
const JitsiConnectionEvents = JitsiMeetJS.events.connection;
diff --git a/react/features/base/connection/actions.web.js b/react/features/base/connection/actions.web.js
index c1b44589e8..5d0cef83c1 100644
--- a/react/features/base/connection/actions.web.js
+++ b/react/features/base/connection/actions.web.js
@@ -5,7 +5,6 @@ import type { Dispatch } from 'redux';
import UIEvents from '../../../../service/UI/UIEvents';
import { SET_DOMAIN } from './actionTypes';
-import './reducer';
declare var APP: Object;
declare var JitsiMeetJS: Object;
diff --git a/react/features/base/connection/index.js b/react/features/base/connection/index.js
index 08fe9014b1..03776f5f02 100644
--- a/react/features/base/connection/index.js
+++ b/react/features/base/connection/index.js
@@ -1,3 +1,5 @@
export * from './actions';
export * from './actionTypes';
export * from './functions';
+
+import './reducer';
diff --git a/react/features/base/lib-jitsi-meet/actions.js b/react/features/base/lib-jitsi-meet/actions.js
index ef9bb81053..64b391e911 100644
--- a/react/features/base/lib-jitsi-meet/actions.js
+++ b/react/features/base/lib-jitsi-meet/actions.js
@@ -5,8 +5,6 @@ import {
LIB_INITIALIZED,
SET_CONFIG
} from './actionTypes';
-import './middleware';
-import './reducer';
/**
* Disposes lib-jitsi-meet.
diff --git a/react/features/base/lib-jitsi-meet/index.js b/react/features/base/lib-jitsi-meet/index.js
index 94ab52e119..a04d876c52 100644
--- a/react/features/base/lib-jitsi-meet/index.js
+++ b/react/features/base/lib-jitsi-meet/index.js
@@ -6,3 +6,6 @@ export { JitsiMeetJS as default };
export * from './actions';
export * from './actionTypes';
export * from './functions';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/base/lib-jitsi-meet/native/index.js b/react/features/base/lib-jitsi-meet/native/index.js
index a689ae4abf..308fb1c68a 100644
--- a/react/features/base/lib-jitsi-meet/native/index.js
+++ b/react/features/base/lib-jitsi-meet/native/index.js
@@ -1,2 +1,2 @@
-require('./polyfills-browser');
-require('./polyfills-browserify');
+import './polyfills-browser';
+import './polyfills-browserify';
diff --git a/react/features/base/media/actions.js b/react/features/base/media/actions.js
index cbd9222ffe..c61cc5262a 100644
--- a/react/features/base/media/actions.js
+++ b/react/features/base/media/actions.js
@@ -8,8 +8,6 @@ import {
SET_VIDEO_MUTED
} from './actionTypes';
import { CAMERA_FACING_MODE } from './constants';
-import './middleware';
-import './reducer';
/**
* Action to set the muted state of the local audio.
diff --git a/react/features/base/media/index.js b/react/features/base/media/index.js
index b826983c44..0a8f4ad7bb 100644
--- a/react/features/base/media/index.js
+++ b/react/features/base/media/index.js
@@ -3,3 +3,6 @@ export * from './actionTypes';
export * from './components';
export * from './constants';
export * from './functions';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/base/participants/actions.js b/react/features/base/participants/actions.js
index 98fa637ce7..2ca491d853 100644
--- a/react/features/base/participants/actions.js
+++ b/react/features/base/participants/actions.js
@@ -7,8 +7,6 @@ import {
PIN_PARTICIPANT
} from './actionTypes';
import { getLocalParticipant } from './functions';
-import './middleware';
-import './reducer';
/**
* Action to update a participant's email.
diff --git a/react/features/base/participants/index.js b/react/features/base/participants/index.js
index a60a814b1e..39f1ee456a 100644
--- a/react/features/base/participants/index.js
+++ b/react/features/base/participants/index.js
@@ -2,3 +2,6 @@ export * from './actions';
export * from './actionTypes';
export * from './constants';
export * from './functions';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/base/tracks/actions.js b/react/features/base/tracks/actions.js
index 93a9b7bc31..59fc4d4de2 100644
--- a/react/features/base/tracks/actions.js
+++ b/react/features/base/tracks/actions.js
@@ -10,8 +10,6 @@ import {
TRACK_REMOVED,
TRACK_UPDATED
} from './actionTypes';
-import './middleware';
-import './reducer';
const JitsiTrackErrors = JitsiMeetJS.errors.track;
const JitsiTrackEvents = JitsiMeetJS.events.track;
diff --git a/react/features/base/tracks/index.js b/react/features/base/tracks/index.js
index 08fe9014b1..969667b3a4 100644
--- a/react/features/base/tracks/index.js
+++ b/react/features/base/tracks/index.js
@@ -1,3 +1,6 @@
export * from './actions';
export * from './actionTypes';
export * from './functions';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/large-video/actions.js b/react/features/large-video/actions.js
index 5d3d233c57..22403f436f 100644
--- a/react/features/large-video/actions.js
+++ b/react/features/large-video/actions.js
@@ -6,8 +6,6 @@ import {
} from '../base/tracks';
import { SELECT_LARGE_VIDEO_PARTICIPANT } from './actionTypes';
-import './middleware';
-import './reducer';
/**
* Signals conference to select a participant.
diff --git a/react/features/large-video/index.js b/react/features/large-video/index.js
index 3c46ed49d1..7f0ef0251d 100644
--- a/react/features/large-video/index.js
+++ b/react/features/large-video/index.js
@@ -1,2 +1,5 @@
export * from './actions';
export * from './components';
+
+import './middleware';
+import './reducer';
diff --git a/react/features/room-lock/actions.js b/react/features/room-lock/actions.js
index 562a5f92ba..7d6c7bba1e 100644
--- a/react/features/room-lock/actions.js
+++ b/react/features/room-lock/actions.js
@@ -1,7 +1,6 @@
import { setPassword } from '../base/conference';
import { BEGIN_ROOM_LOCK_REQUEST, END_ROOM_LOCK_REQUEST } from './actionTypes';
-import './reducer';
/**
* Begins a (user) request to lock a specific conference/room.
diff --git a/react/features/room-lock/index.js b/react/features/room-lock/index.js
index 3c46ed49d1..582e1f9dd4 100644
--- a/react/features/room-lock/index.js
+++ b/react/features/room-lock/index.js
@@ -1,2 +1,4 @@
export * from './actions';
export * from './components';
+
+import './reducer';
diff --git a/react/features/unsupported-browser/actions.js b/react/features/unsupported-browser/actions.js
index dadb934f2f..c07c8a7d54 100644
--- a/react/features/unsupported-browser/actions.js
+++ b/react/features/unsupported-browser/actions.js
@@ -1,5 +1,4 @@
import { DISMISS_MOBILE_APP_PROMO } from './actionTypes';
-import './reducer';
/**
* Returns a Redux action which signals that the UnsupportedMobileBrowser which
diff --git a/react/features/unsupported-browser/index.js b/react/features/unsupported-browser/index.js
index 3c46ed49d1..582e1f9dd4 100644
--- a/react/features/unsupported-browser/index.js
+++ b/react/features/unsupported-browser/index.js
@@ -1,2 +1,4 @@
export * from './actions';
export * from './components';
+
+import './reducer';