add logs for moderator audio actions

This commit is contained in:
KDSBrowne 2019-08-21 17:38:04 +00:00
parent 17f9dfabd2
commit aaac4efd13

View File

@ -3,6 +3,7 @@ import { defineMessages, injectIntl } from 'react-intl';
import _ from 'lodash'; import _ from 'lodash';
import Button from '/imports/ui/components/button/component'; import Button from '/imports/ui/components/button/component';
import { Session } from 'meteor/session'; import { Session } from 'meteor/session';
import logger from '/imports/startup/client/logger';
import { styles } from './styles'; import { styles } from './styles';
import BreakoutRoomContainer from './breakout-remaining-time/container'; import BreakoutRoomContainer from './breakout-remaining-time/container';
@ -142,14 +143,33 @@ class BreakoutRoom extends PureComponent {
const moderatorJoinedAudio = isMicrophoneUser && isModerator; const moderatorJoinedAudio = isMicrophoneUser && isModerator;
const disable = waiting && requestedBreakoutId !== breakoutId; const disable = waiting && requestedBreakoutId !== breakoutId;
const audioAction = joinedAudioOnly const audioAction = joinedAudioOnly
? () => this.returnBackToMeeeting(breakoutId) ? () => {
: () => this.transferUserToBreakoutRoom(breakoutId); this.returnBackToMeeeting(breakoutId);
return logger.debug({
logCode: 'breakoutroom_return_main_audio',
extraInfo: { logType: 'moderator_action' },
}, 'Returning to main audio (breakout room audio closed)');
}
: () => {
this.transferUserToBreakoutRoom(breakoutId);
return logger.debug({
logCode: 'breakoutroom_join_audio',
extraInfo: { logType: 'moderator_action' },
}, 'joining breakout room audio (main room audio closed)');
};
return ( return (
<div className={styles.breakoutActions}> <div className={styles.breakoutActions}>
<Button <Button
label={intl.formatMessage(intlMessages.breakoutJoin)} label={intl.formatMessage(intlMessages.breakoutJoin)}
aria-label={`${intl.formatMessage(intlMessages.breakoutJoin)} ${number}`} aria-label={`${intl.formatMessage(intlMessages.breakoutJoin)} ${number}`}
onClick={() => this.getBreakoutURL(breakoutId)} onClick={() => {
this.getBreakoutURL(breakoutId);
logger.debug({
logCode: 'breakoutroom_join',
extraInfo: { logType: 'moderator_action' },
}, 'joining breakout room closed audio in the main room');
}
}
disabled={disable} disabled={disable}
className={styles.joinButton} className={styles.joinButton}
/> />