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(invite): react to dialinEnabled metadata changes in open invite dialog

damencho68914b984030
diff --git a/react/features/base/conference/reducer.ts b/react/features/base/conference/reducer.ts
index f62abfa809..0b19aae1c7 100644
--- a/react/features/base/conference/reducer.ts
+++ b/react/features/base/conference/reducer.ts
@@ -52,6 +52,7 @@ const DEFAULT_STATE = {
};
export interface IConferenceMetadata {
+ dialinEnabled?: boolean;
files: {
[fileId: string]: {
authorParticipantJid: string;
diff --git a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx
index cf8d1ccb54..e30a0edfec 100644
--- a/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx
+++ b/react/features/invite/components/add-people-dialog/web/AddPeopleDialog.tsx
@@ -18,6 +18,7 @@ import {
getInviteText,
getInviteTextiOS,
isAddPeopleEnabled,
+ isDialInEnabled,
isDialOutEnabled,
isSharingEnabled,
sharingFeatures
@@ -205,7 +206,7 @@ function mapStateToProps(state: IReduxState, ownProps: Partial<IProps>) {
return {
_dialIn: dialIn,
- _dialInVisible: isSharingEnabled(sharingFeatures.dialIn),
+ _dialInVisible: isSharingEnabled(sharingFeatures.dialIn) && isDialInEnabled(state),
_urlSharingVisible: isDynamicBrandingDataLoaded(state) && isSharingEnabled(sharingFeatures.url),
_emailSharingVisible: isSharingEnabled(sharingFeatures.email),
_invitationText: getInviteText({ state,
diff --git a/react/features/invite/functions.ts b/react/features/invite/functions.ts
index 715d6bc1ba..8b7e7a31ce 100644
--- a/react/features/invite/functions.ts
+++ b/react/features/invite/functions.ts
@@ -504,10 +504,9 @@ export function isDialOutEnabled(state: IReduxState): boolean {
* @returns {boolean} Indication of whether dial out is currently enabled.
*/
export function isDialInEnabled(state: IReduxState): boolean {
- const dialInDisabled = state['features/base/conference']
- .conference?.getMetadataHandler()?.getMetadata()?.dialinEnabled === false;
+ const { metadata } = state['features/base/conference'];
- if (dialInDisabled) {
+ if (metadata?.dialinEnabled === false) {
return false;
}