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
adds conference to lookup of dial in numbers (#3859)
Aaron van Meertenb9a14acd3c5c
diff --git a/react/features/invite/actions.js b/react/features/invite/actions.jsindex 30cf886fa7..58c36d9417 100644--- a/react/features/invite/actions.js+++ b/react/features/invite/actions.js@@ -174,7 +174,7 @@ export function updateDialInNumbers() {const { room } = state['features/base/conference'];Promise.all([- getDialInNumbers(dialInNumbersUrl),+ getDialInNumbers(dialInNumbersUrl, room, mucURL),getDialInConferenceID(dialInConfCodeUrl, room, mucURL)]).then(([ dialInNumbers, { conference, id, message } ]) => {diff --git a/react/features/invite/components/dial-in-summary/DialInSummary.web.js b/react/features/invite/components/dial-in-summary/DialInSummary.web.jsindex 0903488aee..5ff2e93073 100644--- a/react/features/invite/components/dial-in-summary/DialInSummary.web.js+++ b/react/features/invite/components/dial-in-summary/DialInSummary.web.js@@ -190,13 +190,25 @@ class DialInSummary extends Component<Props, State> {* @returns {Promise}*/_getNumbers() {- const { dialInNumbersUrl } = config;+ const { room } = this.props;+ const { dialInNumbersUrl, hosts } = config;+ const mucURL = hosts && hosts.muc;+ let URLSuffix = '';if (!dialInNumbersUrl) {return Promise.reject(this.props.t('info.dialInNotSupported'));}- return fetch(dialInNumbersUrl)+ // when room and mucURL are available+ // provide conference when looking up dial in numbers++ if (room && mucURL) {+ URLSuffix = `?conference=${room}@${mucURL}`;+ }+ const conferenceIDURL+ = `${dialInNumbersUrl}${URLSuffix}`;++ return fetch(conferenceIDURL).then(response => response.json()).catch(() => Promise.reject(this.props.t('info.genericError')));}diff --git a/react/features/invite/functions.js b/react/features/invite/functions.jsindex 7df5946d9d..cf268badbc 100644--- a/react/features/invite/functions.js+++ b/react/features/invite/functions.js@@ -56,12 +56,22 @@ export function getDialInConferenceID(* Sends a GET request for phone numbers used to dial into a conference.** @param {string} url - The service that returns confernce dial-in numbers.+ * @param {string} roomName - The conference name to find the associated+ * conference ID.+ * @param {string} mucURL - In which MUC the conference exists.* @returns {Promise} - The promise created by the request. The returned numbers* may be an array of numbers or an object with countries as keys and arrays of* phone number strings.*/-export function getDialInNumbers(url: string): Promise<*> {- return doGetJSON(url);+export function getDialInNumbers(+ url: string,+ roomName: string,+ mucURL: string+): Promise<*> {++ const fullUrl = `${url}?conference=${roomName}@${mucURL}`;++ return doGetJSON(fullUrl);}/**@@ -442,7 +452,7 @@ export function getShareInfoText(}numbersPromise = Promise.all([- getDialInNumbers(dialInNumbersUrl),+ getDialInNumbers(dialInNumbersUrl, room, mucURL),getDialInConferenceID(dialInConfCodeUrl, room, mucURL)]).then(([ { defaultCountry, numbers }, {conference, id, message } ]) => {