|
@@ -38,6 +38,7 @@ import {
|
38
|
38
|
import MiddlewareRegistry from '../redux/MiddlewareRegistry';
|
39
|
39
|
import StateListenerRegistry from '../redux/StateListenerRegistry';
|
40
|
40
|
import { TRACK_ADDED, TRACK_REMOVED } from '../tracks/actionTypes';
|
|
41
|
+import { parseURIString } from '../util/uri';
|
41
|
42
|
|
42
|
43
|
import {
|
43
|
44
|
CONFERENCE_FAILED,
|
|
@@ -421,13 +422,27 @@ function _connectionFailed({ dispatch, getState }: IStore, next: Function, actio
|
421
|
422
|
}
|
422
|
423
|
|
423
|
424
|
if (error.name === JitsiConnectionErrors.CONFERENCE_REQUEST_FAILED) {
|
|
425
|
+ let notificationAction: Function = showNotification;
|
424
|
426
|
const notificationProps = {
|
425
|
427
|
customActionNameKey: [ 'dialog.rejoinNow' ],
|
426
|
428
|
customActionHandler: [ () => dispatch(reloadNow()) ],
|
427
|
429
|
descriptionKey: 'notify.connectionFailed'
|
428
|
430
|
} as INotificationProps;
|
429
|
431
|
|
430
|
|
- dispatch(showNotification(notificationProps, NOTIFICATION_TIMEOUT_TYPE.STICKY));
|
|
432
|
+ const { locationURL = { href: '' } as URL } = getState()['features/base/connection'];
|
|
433
|
+ const { tenant } = parseURIString(locationURL.href) || {};
|
|
434
|
+
|
|
435
|
+ if (tenant.startsWith('-') || tenant.endsWith('-')) {
|
|
436
|
+ notificationProps.descriptionKey = 'notify.invalidTenantHyphenDescription';
|
|
437
|
+ notificationProps.titleKey = 'notify.invalidTenant';
|
|
438
|
+ notificationAction = showErrorNotification;
|
|
439
|
+ } else if (tenant.length > 63) {
|
|
440
|
+ notificationProps.descriptionKey = 'notify.invalidTenantLengthDescription';
|
|
441
|
+ notificationProps.titleKey = 'notify.invalidTenant';
|
|
442
|
+ notificationAction = showErrorNotification;
|
|
443
|
+ }
|
|
444
|
+
|
|
445
|
+ dispatch(notificationAction(notificationProps, NOTIFICATION_TIMEOUT_TYPE.STICKY));
|
431
|
446
|
}
|
432
|
447
|
|
433
|
448
|
const result = next(action);
|