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
fix(info): respect path when linking to dial in page
Leonard Kim824a8a88644e
diff --git a/react/features/invite/components/info-dialog/InfoDialog.web.js b/react/features/invite/components/info-dialog/InfoDialog.web.jsindex 02a54ae4c9..e240c53d76 100644--- a/react/features/invite/components/info-dialog/InfoDialog.web.js+++ b/react/features/invite/components/info-dialog/InfoDialog.web.js@@ -268,8 +268,29 @@ class InfoDialog extends Component {* @returns {string}*/_getDialInfoPageURL() {- return `${window.location.origin}/static/dialInInfo.html?room=${- encodeURIComponent(this.props._conferenceName)}`;+ const origin = window.location.origin;+ const encodedConferenceName+ = encodeURIComponent(this.props._conferenceName);+ const pathParts = window.location.pathname.split('/');++ // More than two parts implies the path consists of more than the first+ // forward slash and the meeting name. If that is the case, drop the+ // last segment of the path, which we assume is the meeting name. This+ // is necessary when is hosted on a url with a path.+ if (pathParts.length > 2) {+ pathParts.length = pathParts.length - 1;+ }++ const newPath = pathParts.reduce((accumulator, currentValue) => {+ if (currentValue) {+ return `${accumulator}/${currentValue}`;+ }++ return accumulator;+ }, '');++ return `${origin}${newPath}/static/dialInInfo.html?room=${+ encodedConferenceName}`;}/**