Add user verification in 2 spots and Fiz join breakout opening into breakout

This commit is contained in:
Tainan Felipe 2019-03-14 13:45:20 -03:00
parent 0727f87cf9
commit eafd7f6673
3 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,7 @@ function meetings(credentials, isModerator = false) {
if (isModerator) {
const User = Users.findOne({ userId: requesterUserId });
if (User.moderator) {
if (!!User && User.moderator) {
selector.$or.push({
'meetingProp.isBreakout': true,
'breakoutProps.parentId': meetingId,

View File

@ -58,7 +58,7 @@ function users(credentials, isModerator = false) {
if (isModerator) {
const User = Users.findOne({ userId: requesterUserId });
if (User.moderator) {
if (!!User && User.moderator) {
selector.$or.push({
'breakoutProps.isBreakoutUser': true,
'breakoutProps.parentId': meetingId,

View File

@ -162,7 +162,10 @@ class NavBar extends PureComponent {
breakouts.forEach((breakout) => {
const userOnMeeting = breakout.users.filter(u => u.userId === Auth.userID).length;
if (breakout.freeJoin && !didSendBreakoutInvite && !userOnMeeting) {
if (breakout.freeJoin
&& !didSendBreakoutInvite
&& !userOnMeeting
&& !isBreakoutRoom) {
this.inviteUserToBreakout(breakout);
this.setState({ didSendBreakoutInvite: true });
}