mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-15 08:27:48 +00:00
* feat(prejoin) created native Prejoin screen * feat(prejoin) fixed useState callback and updates warnings * feat(prejoin) created styles file * feat(prejoin) moved nav from middleware to appNavigate, created native DeviceStatus * feat(prejoin) updated styles * feat(prejoin) review remarks pt. 1 * feat(prejoin) removed unused styles * feat(prejoin) review remarks pt. 2 * feat(prejoin) comment fix * feat(prejoin) added header title * feat(prejoin) review remarks * feat(lobby) updated styles * feat(prejoin) updated lobby screen header button functionality * feat(prejoin) review remarks pt 3 * feat(welcome) removed VideoSwitch component * feat(mobile/navigation) fixed linter * feat(welcome) moved isWelcomePageEnabled to functions.ts * feat(mobile/navigation) screen options and order updates * feat(app) review remark * feat(welcome) added translation for screen header title and fixed build * feat(mobile/navigation) added screen title translation and created screen option * feat(mobile/navigation) fixed screenOptions import * feat(mobile/navigation) added DialInSummary title translation, fixed animation and close button * feat(welcome) fixed build * feat(welcome) removed extra check * feat(prejoin) review remarks pt 4 * feat(prejoin) added Join in low bandwidth mode btn * feat(welcome) changed welcome screen header title * fixup lobby close
37 lines
1.1 KiB
JavaScript
37 lines
1.1 KiB
JavaScript
import { appNavigate } from '../../app/actions';
|
|
import { CONFERENCE_FAILED } from '../../base/conference/actionTypes';
|
|
import { JitsiConferenceErrors } from '../../base/lib-jitsi-meet';
|
|
import { MiddlewareRegistry } from '../../base/redux';
|
|
|
|
|
|
MiddlewareRegistry.register(store => next => action => {
|
|
switch (action.type) {
|
|
|
|
case CONFERENCE_FAILED:
|
|
return _conferenceFailed(store, next, action);
|
|
}
|
|
|
|
return next(action);
|
|
});
|
|
|
|
/**
|
|
* Function to handle the conference failed event and navigate the user to the lobby screen
|
|
* based on the failure reason.
|
|
*
|
|
* @param {Object} store - The Redux store.
|
|
* @param {Function} next - The Redux next function.
|
|
* @param {Object} action - The Redux action.
|
|
* @returns {Object}
|
|
*/
|
|
function _conferenceFailed({ dispatch }, next, action) {
|
|
const { error } = action;
|
|
|
|
// We need to cover the case where knocking participant
|
|
// is rejected from entering the conference
|
|
if (error.name === JitsiConferenceErrors.CONFERENCE_ACCESS_DENIED) {
|
|
dispatch(appNavigate(undefined));
|
|
}
|
|
|
|
return next(action);
|
|
}
|