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
Handles data from feedback callback and use it for correct close page.
damencho5feeef012298
diff --git a/conference.js b/conference.jsindex b10f6c5569..4844974954 100644--- a/conference.js+++ b/conference.js@@ -184,29 +184,33 @@ function muteLocalVideo (muted) {* If requested show a thank you dialog before that.* If we have a close page enabled, redirect to it without* showing any other dialog.- * @param {boolean} showThankYou whether we should show a thank you dialog+ *+ * @param {object} data Feedback data+ * @param {boolean} data.showThankYou - whether we should show thank you dialog+ * @param {boolean} data.feedbackSubmitted - whether feedback was submitted*/-function maybeRedirectToWelcomePage(showThankYou) {-+function maybeRedirectToWelcomePage(data) {// if close page is enabled redirect to it, without further actionif (config.enableClosePage) {- window.location.pathname = "close.html";+ if (data.feedbackSubmitted)+ window.location.pathname = "close.html";+ else+ window.location.pathname = "close2.html";return;}- if (showThankYou) {+ // else: show thankYou dialog only if there is no feedback+ if (data.showThankYou)APP.UI.messageHandler.openMessageDialog(null, "dialog.thankYou", {appName:interfaceConfig.APP_NAME});- }- if (!config.enableWelcomePage) {- return;+ // if Welcome page is enabled redirect to welcome page after 3 sec.+ if (config.enableWelcomePage) {+ setTimeout(() => {+ APP.settings.setWelcomePageEnabled(true);+ window.location.pathname = "/";+ }, 3000);}- // redirect to welcome page- setTimeout(() => {- APP.settings.setWelcomePageEnabled(true);- window.location.pathname = "/";- }, 3000);}/**diff --git a/modules/UI/UI.js b/modules/UI/UI.jsindex f4cb072858..b33356d7ef 100644--- a/modules/UI/UI.js+++ b/modules/UI/UI.js@@ -1037,25 +1037,25 @@ UI.requestFeedbackOnHangup = function () {if (Feedback.isVisible())return Promise.reject(UIErrors.FEEDBACK_REQUEST_IN_PROGRESS);// Feedback has been submitted already.- else if (Feedback.isEnabled() && Feedback.isSubmitted())- return Promise.resolve(true);+ else if (Feedback.isEnabled() && Feedback.isSubmitted()) {+ return Promise.resolve({+ showThankYou : true,+ feedbackSubmitted: true+ });+ }elsereturn new Promise(function (resolve) {if (Feedback.isEnabled()) {- // If the user has already entered feedback, we'll show the- // window and immidiately start the conference dispose timeout.- if (Feedback.getFeedbackScore() > 0) {- Feedback.openFeedbackWindow();- resolve(false);-- } else { // Otherwise we'll wait for user's feedback.- Feedback.openFeedbackWindow(() => resolve(false));- }+ Feedback.openFeedbackWindow(+ (data) => {+ data.showThankYou = false;+ resolve(data);+ });} else {// If the feedback functionality isn't enabled we show a thank// you dialog. Signaling it (true), so the caller// of requestFeedback can act on it- resolve(true);+ resolve({showThankYou : true, feedbackSubmitted: false});}});};