diff --git a/bigbluebutton-html5/imports/ui/components/meeting-ended/component.tsx b/bigbluebutton-html5/imports/ui/components/meeting-ended/component.tsx index 385331472549..b8a307ce2c4c 100644 --- a/bigbluebutton-html5/imports/ui/components/meeting-ended/component.tsx +++ b/bigbluebutton-html5/imports/ui/components/meeting-ended/component.tsx @@ -229,7 +229,7 @@ const MeetingEnded: React.FC = ({ isModerator, }; - const pathMatch = window.location.pathname.match('^(.*)/html5client/join$'); + const pathMatch = window.location.pathname.match('^(.*)/html5client/$'); if (pathMatch == null) { throw new Error('Failed to match BBB client URI'); } @@ -319,6 +319,23 @@ const MeetingEnded: React.FC = ({ const feedbackScreen = useMemo(() => { const shouldShowFeedback = askForFeedbackOnLogout && !dispatched; const noRating = selectedStars === 0; + + let buttonAction = () => confirmRedirect(isBreakout, allowDefaultLogoutUrl); + let buttonDesc = intl.formatMessage(intlMessage.confirmDesc); + let buttonLabel = intl.formatMessage(intlMessage.buttonOkay); + + if (!dispatched) { + if (noRating) { + buttonAction = () => setDispatched(true); + buttonDesc = intl.formatMessage(intlMessage.confirmDesc); + buttonLabel = intl.formatMessage(intlMessage.buttonOkay); + } else { + buttonAction = () => sendFeedback(); + buttonDesc = intl.formatMessage(intlMessage.sendDesc); + buttonLabel = intl.formatMessage(intlMessage.sendLabel); + } + } + return ( <> @@ -344,23 +361,13 @@ const MeetingEnded: React.FC = ({ ) : null} - {noRating ? ( - setDispatched(true)} - aria-details={intl.formatMessage(intlMessage.confirmDesc)} - > - {intl.formatMessage(intlMessage.buttonOkay)} - - ) : null} - {!noRating ? ( - - {intl.formatMessage(intlMessage.sendLabel)} - - ) : null} + + {buttonLabel} + );