|
|
@@ -24,7 +24,7 @@ import { overwriteConfig } from '../config/actions';
|
|
24
|
24
|
import { CONNECTION_ESTABLISHED, CONNECTION_FAILED } from '../connection/actionTypes';
|
|
25
|
25
|
import { connect, connectionDisconnected, disconnect } from '../connection/actions';
|
|
26
|
26
|
import { validateJwt } from '../jwt/functions';
|
|
27
|
|
-import { JitsiConferenceErrors } from '../lib-jitsi-meet';
|
|
|
27
|
+import { JitsiConferenceErrors, JitsiConnectionErrors } from '../lib-jitsi-meet';
|
|
28
|
28
|
import { PARTICIPANT_UPDATED, PIN_PARTICIPANT } from '../participants/actionTypes';
|
|
29
|
29
|
import { PARTICIPANT_ROLE } from '../participants/constants';
|
|
30
|
30
|
import {
|
|
|
@@ -392,18 +392,22 @@ function _logJwtErrors(message: string, state: IReduxState) {
|
|
392
|
392
|
function _connectionFailed({ dispatch, getState }: IStore, next: Function, action: AnyAction) {
|
|
393
|
393
|
_logJwtErrors(action.error.message, getState());
|
|
394
|
394
|
|
|
395
|
|
- dispatch(showErrorNotification({
|
|
396
|
|
- descriptionKey: 'dialog.tokenAuthFailed',
|
|
397
|
|
- titleKey: 'dialog.tokenAuthFailedTitle'
|
|
398
|
|
- }, NOTIFICATION_TIMEOUT_TYPE.LONG));
|
|
|
395
|
+ const { connection, error } = action;
|
|
|
396
|
+
|
|
|
397
|
+ // do not show the notification when we will prompt the user
|
|
|
398
|
+ // for username and password
|
|
|
399
|
+ if (error.name === JitsiConnectionErrors.PASSWORD_REQUIRED
|
|
|
400
|
+ && getState()['features/base/jwt'].jwt) {
|
|
|
401
|
+ dispatch(showErrorNotification({
|
|
|
402
|
+ descriptionKey: 'dialog.tokenAuthFailed',
|
|
|
403
|
+ titleKey: 'dialog.tokenAuthFailedTitle'
|
|
|
404
|
+ }, NOTIFICATION_TIMEOUT_TYPE.LONG));
|
|
|
405
|
+ }
|
|
399
|
406
|
|
|
400
|
407
|
const result = next(action);
|
|
401
|
408
|
|
|
402
|
409
|
_removeUnloadHandler(getState);
|
|
403
|
410
|
|
|
404
|
|
- const { connection } = action;
|
|
405
|
|
- const { error } = action;
|
|
406
|
|
-
|
|
407
|
411
|
forEachConference(getState, conference => {
|
|
408
|
412
|
// TODO: revisit this
|
|
409
|
413
|
// It feels that it would make things easier if JitsiConference
|