Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(jaas) hide support link in invite error for jaas users

Tudor-Ovidiu Avram3a073d9af4be
diff --git a/react/features/base/react/components/web/InlineDialogFailure.js b/react/features/base/react/components/web/InlineDialogFailure.js
index c8fa8cce9c..5ea57bd2e5 100644
--- a/react/features/base/react/components/web/InlineDialogFailure.js
+++ b/react/features/base/react/components/web/InlineDialogFailure.js
@@ -20,7 +20,12 @@ type Props = {
/**
* Invoked to obtain translated strings.
*/
- t: Function
+ t: Function,
+
+ /**
+ * Indicates whether the support link should be shown in case of an error
+ */
+ showSupportLink: Boolean,
};
/**
@@ -33,12 +38,12 @@ class InlineDialogFailure extends Component<Props> {
* @returns {ReactElement}
*/
render() {
- const { t } = this.props;
+ const { t, showSupportLink } = this.props;
const supportLink = interfaceConfig.SUPPORT_URL;
const supportString = t('inlineDialogFailure.supportMsg');
const supportLinkElem
- = supportLink
+ = supportLink && showSupportLink
? (
<div className = 'inline-dialog-error-text'>
<span>{ supportString.padEnd(supportString.length + 1) }
diff --git a/react/features/base/react/components/web/MultiSelectAutocomplete.js b/react/features/base/react/components/web/MultiSelectAutocomplete.js
index 1365b208d7..cdf29ee5e8 100644
--- a/react/features/base/react/components/web/MultiSelectAutocomplete.js
+++ b/react/features/base/react/components/web/MultiSelectAutocomplete.js
@@ -70,7 +70,12 @@ type Props = {
/**
* Indicates if we should focus.
*/
- shouldFocus: boolean
+ shouldFocus: boolean,
+
+ /**
+ * Indicates whether the support link should be shown in case of an error
+ */
+ showSupportLink: Boolean,
};
/**
@@ -263,7 +268,8 @@ class MultiSelectAutocomplete extends Component<Props, State> {
const content = (
<div className = 'autocomplete-error'>
<InlineDialogFailure
- onRetry = { this._onRetry } />
+ onRetry = { this._onRetry }
+ showSupportLink = { this.props.showSupportLink } />
</div>
);
diff --git a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
index 72ae039f31..c20dd60455 100644
--- a/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
+++ b/react/features/invite/components/add-people-dialog/web/InviteContactsForm.js
@@ -10,6 +10,7 @@ import { Icon, IconPhone } from '../../../../base/icons';
import { getLocalParticipant } from '../../../../base/participants';
import { MultiSelectAutocomplete } from '../../../../base/react';
import { connect } from '../../../../base/redux';
+import { isVpaasMeeting } from '../../../../billing-counter/functions';
import { hideAddPeopleDialog } from '../../../actions';
import AbstractAddPeopleDialog, {
type Props as AbstractProps,
@@ -31,6 +32,11 @@ type Props = AbstractProps & {
*/
_footerTextEnabled: boolean,
+ /**
+ * Whether the meeting belongs to JaaS user
+ */
+ _isVpaas: boolean,
+
/**
* The redux {@code dispatch} function.
*/
@@ -110,6 +116,7 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
const {
_addPeopleEnabled,
_dialOutEnabled,
+ _isVpaas,
t
} = this.props;
const footerText = this._renderFooterText();
@@ -152,7 +159,8 @@ class InviteContactsForm extends AbstractAddPeopleDialog<Props, State> {
ref = { this._setMultiSelectElement }
resourceClient = { this._resourceClient }
shouldFitContainer = { true }
- shouldFocus = { true } />
+ shouldFocus = { true }
+ showSupportLink = { !_isVpaas } />
{ this._renderFormActions() }
</div>
);
@@ -516,7 +524,8 @@ function _mapStateToProps(state) {
return {
..._abstractMapStateToProps(state),
- _footerTextEnabled: footerTextEnabled
+ _footerTextEnabled: footerTextEnabled,
+ _isVpaas: isVpaasMeeting(state)
};
}