Merge pull request #8573 from Tainan404/issue-8569
Show right breakout room in free join mode
This commit is contained in:
commit
96e13140e3
@ -76,10 +76,11 @@ class BreakoutRoomInvitation extends Component {
|
|||||||
if (hasBreakouts && !breakoutUserIsIn && !amIModerator) {
|
if (hasBreakouts && !breakoutUserIsIn && !amIModerator) {
|
||||||
// Have to check for freeJoin breakouts first because currentBreakoutUser will
|
// Have to check for freeJoin breakouts first because currentBreakoutUser will
|
||||||
// populate after a room has been joined
|
// populate after a room has been joined
|
||||||
|
const breakoutRoom = getBreakoutByUser(currentBreakoutUser);
|
||||||
const freeJoinBreakout = breakouts.find(breakout => breakout.freeJoin);
|
const freeJoinBreakout = breakouts.find(breakout => breakout.freeJoin);
|
||||||
if (freeJoinBreakout) {
|
if (freeJoinBreakout) {
|
||||||
if (!didSendBreakoutInvite) {
|
if (!didSendBreakoutInvite) {
|
||||||
this.inviteUserToBreakout(freeJoinBreakout);
|
this.inviteUserToBreakout(breakoutRoom || freeJoinBreakout);
|
||||||
this.setState({ didSendBreakoutInvite: true });
|
this.setState({ didSendBreakoutInvite: true });
|
||||||
}
|
}
|
||||||
} else if (currentBreakoutUser) {
|
} else if (currentBreakoutUser) {
|
||||||
@ -87,7 +88,6 @@ class BreakoutRoomInvitation extends Component {
|
|||||||
const oldCurrentUser = oldProps.currentBreakoutUser || {};
|
const oldCurrentUser = oldProps.currentBreakoutUser || {};
|
||||||
const oldInsertedTime = oldCurrentUser.insertedTime;
|
const oldInsertedTime = oldCurrentUser.insertedTime;
|
||||||
if (currentInsertedTime !== oldInsertedTime) {
|
if (currentInsertedTime !== oldInsertedTime) {
|
||||||
const breakoutRoom = getBreakoutByUser(currentBreakoutUser);
|
|
||||||
const breakoutId = Session.get('lastBreakoutOpened');
|
const breakoutId = Session.get('lastBreakoutOpened');
|
||||||
if (breakoutRoom.breakoutId !== breakoutId) {
|
if (breakoutRoom.breakoutId !== breakoutId) {
|
||||||
this.inviteUserToBreakout(breakoutRoom);
|
this.inviteUserToBreakout(breakoutRoom);
|
||||||
|
Loading…
Reference in New Issue
Block a user