fix breakout not closing on end
This commit is contained in:
parent
7cd475b2bf
commit
189760d393
@ -2,7 +2,7 @@ import React, { cloneElement } from 'react';
|
|||||||
import { createContainer } from 'meteor/react-meteor-data';
|
import { createContainer } from 'meteor/react-meteor-data';
|
||||||
import { withRouter } from 'react-router';
|
import { withRouter } from 'react-router';
|
||||||
import { defineMessages, injectIntl } from 'react-intl';
|
import { defineMessages, injectIntl } from 'react-intl';
|
||||||
|
import PropTypes from 'prop-types';
|
||||||
import Auth from '/imports/ui/services/auth';
|
import Auth from '/imports/ui/services/auth';
|
||||||
import Users from '/imports/api/2.0/users';
|
import Users from '/imports/api/2.0/users';
|
||||||
import Breakouts from '/imports/api/2.0/breakouts';
|
import Breakouts from '/imports/api/2.0/breakouts';
|
||||||
@ -13,6 +13,7 @@ import ClosedCaptionsContainer from '/imports/ui/components/closed-captions/cont
|
|||||||
import {
|
import {
|
||||||
getFontSize,
|
getFontSize,
|
||||||
getCaptionsStatus,
|
getCaptionsStatus,
|
||||||
|
meetingIsBreakout,
|
||||||
} from './service';
|
} from './service';
|
||||||
|
|
||||||
import { withModalMounter } from '../modal/service';
|
import { withModalMounter } from '../modal/service';
|
||||||
@ -22,6 +23,14 @@ import NavBarContainer from '../nav-bar/container';
|
|||||||
import ActionsBarContainer from '../actions-bar/container';
|
import ActionsBarContainer from '../actions-bar/container';
|
||||||
import MediaContainer from '../media/container';
|
import MediaContainer from '../media/container';
|
||||||
|
|
||||||
|
const propTypes = {
|
||||||
|
navbar: PropTypes.node,
|
||||||
|
actionsbar: PropTypes.node,
|
||||||
|
media: PropTypes.node,
|
||||||
|
location: PropTypes.object.isRequired,
|
||||||
|
children: PropTypes.node.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
navbar: <NavBarContainer />,
|
navbar: <NavBarContainer />,
|
||||||
actionsbar: <ActionsBarContainer />,
|
actionsbar: <ActionsBarContainer />,
|
||||||
@ -45,10 +54,22 @@ const intlMessages = defineMessages({
|
|||||||
|
|
||||||
const AppContainer = (props) => {
|
const AppContainer = (props) => {
|
||||||
// inject location on the navbar container
|
// inject location on the navbar container
|
||||||
const navbarWithLocation = cloneElement(props.navbar, { location: props.location });
|
const {
|
||||||
|
navbar,
|
||||||
|
actionsbar,
|
||||||
|
media,
|
||||||
|
...otherProps
|
||||||
|
} = props;
|
||||||
|
|
||||||
|
const navbarWithLocation = cloneElement(navbar, { location: props.location });
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<App {...props} navbar={navbarWithLocation}>
|
<App
|
||||||
|
navbar={navbarWithLocation}
|
||||||
|
actionsbar={actionsbar}
|
||||||
|
media={media}
|
||||||
|
{...otherProps}
|
||||||
|
>
|
||||||
{props.children}
|
{props.children}
|
||||||
</App>
|
</App>
|
||||||
);
|
);
|
||||||
@ -83,7 +104,9 @@ export default withRouter(injectIntl(withModalMounter(createContainer((
|
|||||||
// forcelly logged out when the meeting is ended
|
// forcelly logged out when the meeting is ended
|
||||||
Meetings.find({ meetingId: Auth.meetingID }).observeChanges({
|
Meetings.find({ meetingId: Auth.meetingID }).observeChanges({
|
||||||
removed() {
|
removed() {
|
||||||
sendToError(410, intl.formatMessage(intlMessages.endMeetingMessage));
|
if (!meetingIsBreakout) {
|
||||||
|
sendToError(410, intl.formatMessage(intlMessages.endMeetingMessage));
|
||||||
|
}
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -101,3 +124,4 @@ export default withRouter(injectIntl(withModalMounter(createContainer((
|
|||||||
}, AppContainer))));
|
}, AppContainer))));
|
||||||
|
|
||||||
AppContainer.defaultProps = defaultProps;
|
AppContainer.defaultProps = defaultProps;
|
||||||
|
AppContainer.propTypes = propTypes;
|
||||||
|
Loading…
Reference in New Issue
Block a user