chore(client): Add logs for recording notify action (#21185)

Log whether the user chose to Continue or Leave
This commit is contained in:
Anton Georgiev 2024-09-13 15:51:34 -04:00 committed by GitHub
parent 0144cd4c38
commit 18605be6ad
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2,6 +2,7 @@ import React from 'react';
import { defineMessages, injectIntl } from 'react-intl'; import { defineMessages, injectIntl } from 'react-intl';
import { makeCall } from '/imports/ui/services/api'; import { makeCall } from '/imports/ui/services/api';
import Styled from './styles'; import Styled from './styles';
import logger from '/imports/startup/client/logger';
const intlMessages = defineMessages({ const intlMessages = defineMessages({
title: { title: {
@ -37,11 +38,23 @@ const RecordingNotifyModal = (props) => {
const { intl, toggleShouldNotify, closeModal, isOpen, priority, } = props; const { intl, toggleShouldNotify, closeModal, isOpen, priority, } = props;
function skipButtonHandle() { function skipButtonHandle() {
logger.info({
logCode: 'recording_started_notify_user_hit_leave',
extraInfo: {},
}, 'The user is reminded that recording commences. The user pressed Leave.');
makeCall('userLeftMeeting'); makeCall('userLeftMeeting');
Session.set('codeError', LOGOUT_CODE); Session.set('codeError', LOGOUT_CODE);
toggleShouldNotify(); toggleShouldNotify();
} }
function handleContinueInRecordedSession() {
logger.info({
logCode: 'recording_started_notify_user_hit_continue',
extraInfo: {},
}, 'The user is reminded that recording commences. The user pressed Continue.');
closeModal();
}
return ( return (
<Styled.RecordingNotifyModal <Styled.RecordingNotifyModal
contentLabel={intl.formatMessage(intlMessages.title)} contentLabel={intl.formatMessage(intlMessages.title)}
@ -60,7 +73,7 @@ const RecordingNotifyModal = (props) => {
<Styled.NotifyButton <Styled.NotifyButton
color="primary" color="primary"
label={intl.formatMessage(intlMessages.continue)} label={intl.formatMessage(intlMessages.continue)}
onClick={closeModal} onClick={handleContinueInRecordedSession}
aria-label={intl.formatMessage(intlMessages.continueAriaLabel)} aria-label={intl.formatMessage(intlMessages.continueAriaLabel)}
/> />
<Styled.NotifyButton <Styled.NotifyButton