fix(jaas) log settings error
This commit is contained in:
parent
61ae909ed5
commit
74d7e4fde7
|
@ -1,4 +1,4 @@
|
||||||
/**
|
/**
|
||||||
* Action used to store jaas customer details
|
* Action used to store jaas customer details
|
||||||
*/
|
*/
|
||||||
export const SET_DETAILS = 'SET_DETAILS';
|
export const SET_DETAILS = 'SET_DETAILS';
|
|
@ -1,9 +1,14 @@
|
||||||
import { redirectToStaticPage } from '../app/actions';
|
import { redirectToStaticPage } from '../app/actions';
|
||||||
|
import { CONFERENCE_JOINED } from '../base/conference/actionTypes';
|
||||||
|
import {
|
||||||
|
JitsiConferenceErrors,
|
||||||
|
JitsiConferenceEvents
|
||||||
|
} from '../base/lib-jitsi-meet';
|
||||||
import { MiddlewareRegistry } from '../base/redux';
|
import { MiddlewareRegistry } from '../base/redux';
|
||||||
|
|
||||||
|
|
||||||
import { SET_DETAILS } from './actionTypes';
|
import { SET_DETAILS } from './actionTypes';
|
||||||
import { STATUSES } from './constants';
|
import { STATUSES } from './constants';
|
||||||
|
import logger from './logger';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The redux middleware for jaas.
|
* The redux middleware for jaas.
|
||||||
|
@ -13,12 +18,28 @@ import { STATUSES } from './constants';
|
||||||
*/
|
*/
|
||||||
MiddlewareRegistry.register(store => next => async action => {
|
MiddlewareRegistry.register(store => next => async action => {
|
||||||
switch (action.type) {
|
switch (action.type) {
|
||||||
|
case CONFERENCE_JOINED: {
|
||||||
|
const { conference } = action;
|
||||||
|
|
||||||
|
if (store.getState()['features/base/config'].iAmRecorder) {
|
||||||
|
// We don't register anything on web if we are in iAmRecorder mode
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
conference.on(
|
||||||
|
JitsiConferenceEvents.CONFERENCE_ERROR, (errorType, errorMsg) => {
|
||||||
|
errorType === JitsiConferenceErrors.SETTINGS_ERROR && logger.error(errorMsg);
|
||||||
|
});
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
case SET_DETAILS: {
|
case SET_DETAILS: {
|
||||||
const { status } = action.payload;
|
const { status } = action.payload;
|
||||||
|
|
||||||
if (status === STATUSES.BLOCKED) {
|
if (status === STATUSES.BLOCKED) {
|
||||||
store.dispatch(redirectToStaticPage('/static/planLimit.html'));
|
store.dispatch(redirectToStaticPage('/static/planLimit.html'));
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue