|
@@ -3,16 +3,12 @@ import { CONFERENCE_JOINED } from '../base/conference/actionTypes';
|
3
|
3
|
import { CONNECTION_FAILED } from '../base/connection';
|
4
|
4
|
import { JitsiConnectionErrors } from '../base/lib-jitsi-meet';
|
5
|
5
|
import { MiddlewareRegistry } from '../base/redux';
|
|
6
|
+import { isVpaasMeeting } from '../billing-counter/functions';
|
6
|
7
|
|
7
|
8
|
import { SET_DETAILS } from './actionTypes';
|
8
|
9
|
import { getCustomerDetails } from './actions';
|
9
|
10
|
import { STATUSES } from './constants';
|
10
|
11
|
|
11
|
|
-const redirectErrors = [
|
12
|
|
- JitsiConnectionErrors.CONNECTION_DROPPED_ERROR,
|
13
|
|
- JitsiConnectionErrors.PASSWORD_REQUIRED
|
14
|
|
-];
|
15
|
|
-
|
16
|
12
|
/**
|
17
|
13
|
* The redux middleware for jaas.
|
18
|
14
|
*
|
|
@@ -29,7 +25,15 @@ MiddlewareRegistry.register(store => next => async action => {
|
29
|
25
|
case CONNECTION_FAILED: {
|
30
|
26
|
const { error } = action;
|
31
|
27
|
|
32
|
|
- if (error && redirectErrors.includes(error.name)) {
|
|
28
|
+ if (!isVpaasMeeting(store.getState()) || !error) {
|
|
29
|
+ break;
|
|
30
|
+ }
|
|
31
|
+
|
|
32
|
+ if (error.name === JitsiConnectionErrors.PASSWORD_REQUIRED) {
|
|
33
|
+ if (error.message !== 'could not obtain public key') {
|
|
34
|
+ break;
|
|
35
|
+ }
|
|
36
|
+
|
33
|
37
|
store.dispatch(redirectToStaticPage('/static/planLimit.html'));
|
34
|
38
|
}
|
35
|
39
|
break;
|