Merge pull request #15544 from gustavotrott/html5-show-ejectedReason-2.6
fix (2.6): enhancements over disconnection situation (delay to remove and show ejected reason)
This commit is contained in:
commit
8aa0d1b0e7
@ -44,8 +44,9 @@ const intlMessages = defineMessages({
|
||||
},
|
||||
});
|
||||
|
||||
const endMeeting = (code) => {
|
||||
const endMeeting = (code, ejectedReason) => {
|
||||
Session.set('codeError', code);
|
||||
Session.set('errorMessageDescription', ejectedReason);
|
||||
Session.set('isMeetingEnded', true);
|
||||
};
|
||||
|
||||
@ -188,8 +189,15 @@ const currentUserEmoji = (currentUser) => (currentUser
|
||||
|
||||
export default injectIntl(withModalMounter(withTracker(({ intl, baseControls }) => {
|
||||
Users.find({ userId: Auth.userID, meetingId: Auth.meetingID }).observe({
|
||||
removed() {
|
||||
endMeeting('403');
|
||||
removed(userData) {
|
||||
// wait 3secs (before endMeeting), client will try to authenticate again
|
||||
const delayForReconnection = userData.ejected ? 0 : 3000;
|
||||
setTimeout(() => {
|
||||
const queryCurrentUser = Users.find({ userId: Auth.userID, meetingId: Auth.meetingID });
|
||||
if (queryCurrentUser.count() === 0) {
|
||||
endMeeting(403, userData.ejectedReason || null);
|
||||
}
|
||||
}, delayForReconnection);
|
||||
},
|
||||
});
|
||||
|
||||
@ -258,7 +266,7 @@ export default injectIntl(withModalMounter(withTracker(({ intl, baseControls })
|
||||
randomlySelectedUser,
|
||||
currentUserId: currentUser?.userId,
|
||||
isPresenter,
|
||||
isModerator: currentUser.role === ROLE_MODERATOR,
|
||||
isModerator: currentUser?.role === ROLE_MODERATOR,
|
||||
meetingLayout: layout,
|
||||
meetingLayoutUpdatedAt: layoutUpdatedAt,
|
||||
presentationIsOpen,
|
||||
|
@ -43,6 +43,18 @@ const intlMessages = defineMessages({
|
||||
joined_another_window_reason: {
|
||||
id: 'app.error.joinedAnotherWindow',
|
||||
},
|
||||
user_inactivity_eject_reason: {
|
||||
id: 'app.meeting.logout.userInactivityEjectReason',
|
||||
},
|
||||
user_requested_eject_reason: {
|
||||
id: 'app.meeting.logout.ejectedFromMeeting',
|
||||
},
|
||||
duplicate_user_in_meeting_eject_reason: {
|
||||
id: 'app.meeting.logout.duplicateUserEjectReason',
|
||||
},
|
||||
not_enough_permission_eject_reason: {
|
||||
id: 'app.meeting.logout.permissionEjectReason',
|
||||
},
|
||||
});
|
||||
|
||||
const propTypes = {
|
||||
@ -90,7 +102,9 @@ class ErrorScreen extends PureComponent {
|
||||
{formatedMessage}
|
||||
</Styled.Message>
|
||||
{
|
||||
!errorMessageDescription || (
|
||||
!errorMessageDescription
|
||||
|| formatedMessage === errorMessageDescription
|
||||
|| (
|
||||
<Styled.SessionMessage>
|
||||
{errorMessageDescription}
|
||||
</Styled.SessionMessage>
|
||||
|
@ -179,7 +179,7 @@ class MeetingEnded extends PureComponent {
|
||||
}
|
||||
|
||||
getEndingMessage() {
|
||||
const { intl, code, endedReason } = this.props;
|
||||
const { intl, code, ejectedReason, endedReason } = this.props;
|
||||
|
||||
if (endedReason && endedReason === 'ENDED_DUE_TO_NO_MODERATOR') {
|
||||
return this.endWhenNoModeratorMinutes === 1
|
||||
@ -191,6 +191,10 @@ class MeetingEnded extends PureComponent {
|
||||
return intl.formatMessage(intlMessage.messageEndedByUser, { 0: this.meetingEndedBy });
|
||||
}
|
||||
|
||||
if (intlMessage[ejectedReason]) {
|
||||
return intl.formatMessage(intlMessage[ejectedReason]);
|
||||
}
|
||||
|
||||
if (intlMessage[code]) {
|
||||
return intl.formatMessage(intlMessage[code]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user