Merge pull request #7298 from Tainan404/issue-7026

Fix user count in breakout panel using users collection
This commit is contained in:
Anton Georgiev 2019-04-24 13:48:15 -04:00 committed by GitHub
commit e24cfc1618
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 1 deletions

View File

@ -180,6 +180,7 @@ class BreakoutRoom extends Component {
const {
breakoutRooms,
intl,
getUsersByBreakoutId,
} = this.props;
const {
@ -193,7 +194,7 @@ class BreakoutRoom extends Component {
{intl.formatMessage(intlMessages.breakoutRoom, breakout.sequence.toString())}
<span className={styles.usersAssignedNumberLabel}>
(
{new Set(breakout.users.map(user => user.userId)).size}
{getUsersByBreakoutId(breakout.breakoutId).count()}
)
</span>
</span>

View File

@ -19,6 +19,7 @@ export default withTracker((props) => {
isPresenter,
isModerator,
closeBreakoutPanel,
getUsersByBreakoutId,
} = Service;
const breakoutRooms = findBreakouts();
const isMicrophoneUser = AudioService.isConnected() && !AudioService.isListenOnly();
@ -36,5 +37,6 @@ export default withTracker((props) => {
isPresenter: isPresenter(),
isModerator: isModerator(),
closeBreakoutPanel,
getUsersByBreakoutId,
};
})(BreakoutContainer);

View File

@ -65,6 +65,12 @@ const isModerator = () => {
return mappedUser.isModerator;
};
const getUsersByBreakoutId = breakoutId => Users.find({
meetingId: breakoutId,
connectionStatus: 'online',
});
export default {
findBreakouts,
endAllBreakouts,
@ -76,4 +82,5 @@ export default {
isPresenter,
closeBreakoutPanel,
isModerator,
getUsersByBreakoutId,
};