Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
feat: Adds region parameter to dial out authorize requests.
damenchocdc7962d114f
diff --git a/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx b/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsxindex 9548f0113a..e70d0ff7f7 100644--- a/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx+++ b/react/features/invite/components/add-people-dialog/AbstractAddPeopleDialog.tsx@@ -3,6 +3,7 @@ import { Component } from 'react';import { createInviteDialogEvent } from '../../../analytics/AnalyticsEvents';import { sendAnalytics } from '../../../analytics/functions';import { IReduxState, IStore } from '../../../app/types';+import { getMeetingRegion } from '../../../base/config/functions.any';import { showErrorNotification, showNotification } from '../../../notifications/actions';import { NOTIFICATION_TIMEOUT_TYPE } from '../../../notifications/constants';import { INotificationProps } from '../../../notifications/types';@@ -65,6 +66,11 @@ export interface IProps {*/_peopleSearchUrl: string;+ /**+ * The region where we connected to.+ */+ _region: string;+/*** Whether or not to allow sip invites.*/@@ -248,6 +254,7 @@ export default class AbstractAddPeopleDialog<P extends IProps, S extends IState>_jwt: jwt,_peopleSearchQueryTypes: peopleSearchQueryTypes,_peopleSearchUrl: peopleSearchUrl,+ _region: region,_sipInviteEnabled: sipInviteEnabled} = this.props;const options = {@@ -259,6 +266,7 @@ export default class AbstractAddPeopleDialog<P extends IProps, S extends IState>jwt,peopleSearchQueryTypes,peopleSearchUrl,+ region,sipInviteEnabled};@@ -300,6 +308,7 @@ export function _mapStateToProps(state: IReduxState) {_jwt: state['features/base/jwt'].jwt ?? '',_peopleSearchQueryTypes: peopleSearchQueryTypes ?? [],_peopleSearchUrl: peopleSearchUrl ?? '',+ _region: getMeetingRegion(state),_sipInviteEnabled: isSipInviteEnabled(state)};}diff --git a/react/features/invite/functions.ts b/react/features/invite/functions.tsindex eafd41b40f..f8bac9549d 100644--- a/react/features/invite/functions.ts+++ b/react/features/invite/functions.ts@@ -41,13 +41,15 @@ export const sharingFeatures = {** @param {string} dialNumber - The dial number to check for validity.* @param {string} dialOutAuthUrl - The endpoint to use for checking validity.+ * @param {string} region - The region we are connected to.* @returns {Promise} - The promise created by the request.*/export function checkDialNumber(dialNumber: string,- dialOutAuthUrl: string+ dialOutAuthUrl: string,+ region: string): Promise<{ allow?: boolean; country?: string; phone?: string; }> {- const fullUrl = `${dialOutAuthUrl}?phone=${dialNumber}`;+ const fullUrl = `${dialOutAuthUrl}?phone=${dialNumber}®ion=${region}`;return new Promise((resolve, reject) =>fetch(fullUrl)@@ -146,6 +148,11 @@ export type GetInviteResultsOptions = {*/peopleSearchUrl: string;+ /**+ * The region we are connected to.+ */+ region: string;+/*** Whether or not to check sip invites.*/@@ -174,6 +181,7 @@ export function getInviteResultsForQuery(dialOutEnabled,peopleSearchQueryTypes,peopleSearchUrl,+ region,sipInviteEnabled,jwt} = options;@@ -217,7 +225,7 @@ export function getInviteResultsForQuery(// so ensure only digits get sent.numberToVerify = getDigitsOnly(numberToVerify);- phoneNumberPromise = checkDialNumber(numberToVerify, dialOutAuthUrl);+ phoneNumberPromise = checkDialNumber(numberToVerify, dialOutAuthUrl, region);} else if (dialOutEnabled && !dialOutAuthUrl) {// fake having a country code to hide the country code reminderhasCountryCode = true;