From bb5f589fa1a0fa6fb20a59608102c811fed5437f Mon Sep 17 00:00:00 2001 From: hmuresan Date: Wed, 2 Jun 2021 12:27:15 +0300 Subject: [PATCH] fix(feedback): don't wait for feedback submission on leave meeting --- conference.js | 23 ++++++++++++----------- react/features/feedback/actions.js | 2 +- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/conference.js b/conference.js index 619ae7e03..6076f5174 100644 --- a/conference.js +++ b/conference.js @@ -1972,7 +1972,12 @@ export default { room.on( JitsiConferenceEvents.CONFERENCE_UNIQUE_ID_SET, - (...args) => APP.store.dispatch(conferenceUniqueIdSet(room, ...args))); + (...args) => { + // Preserve the sessionId so that the value is accessible even after room + // is disconnected. + room.sessionId = room.getMeetingUniqueId(); + APP.store.dispatch(conferenceUniqueIdSet(room, ...args)); + }); room.on( JitsiConferenceEvents.AUTH_STATUS_CHANGED, @@ -2792,15 +2797,11 @@ export default { requestFeedbackPromise = Promise.resolve(true); } - let feedbackResult; - - requestFeedbackPromise - .then(res => { - feedbackResult = res; - - return this.leaveRoomAndDisconnect(); - }) - .then(() => { + Promise.all([ + requestFeedbackPromise, + this.leaveRoomAndDisconnect() + ]) + .then(values => { this._room = undefined; room = undefined; @@ -2812,7 +2813,7 @@ export default { if (!interfaceConfig.SHOW_PROMOTIONAL_CLOSE_PAGE) { APP.API.notifyReadyToClose(); } - APP.store.dispatch(maybeRedirectToWelcomePage(feedbackResult)); + APP.store.dispatch(maybeRedirectToWelcomePage(values[0])); }); }, diff --git a/react/features/feedback/actions.js b/react/features/feedback/actions.js index 5760d05e7..eee0ca77b 100644 --- a/react/features/feedback/actions.js +++ b/react/features/feedback/actions.js @@ -134,7 +134,7 @@ export function sendJaasFeedbackMetadata(conference: Object, feedback: Object) { const meetingFqn = extractFqnFromPath(state['features/base/connection'].locationURL.pathname); const feedbackData = { ...feedback, - sessionId: conference.getMeetingUniqueId(), + sessionId: conference.sessionId, userId: user.id, meetingFqn, jwt,