Skip to content
Snippets Groups Projects
Unverified Commit 365dc136 authored by Chad Pilkey's avatar Chad Pilkey Committed by GitHub
Browse files

Merge pull request #7112 from Tainan404/issue-7031

Fix moderator being able to stop recording when it aren't allowed
parents dc9b827b 14318580
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ const propTypes = {
buttonTitle: PropTypes.string.isRequired,
mountModal: PropTypes.func.isRequired,
time: PropTypes.number,
allowStartStopRecording: PropTypes.bool.isRequired,
};
const defaultProps = {
......@@ -51,6 +52,7 @@ class RecordingIndicator extends React.PureComponent {
time,
amIModerator,
intl,
allowStartStopRecording,
} = this.props;
if (!record) return null;
......@@ -60,9 +62,11 @@ class RecordingIndicator extends React.PureComponent {
document.activeElement.blur();
};
const showButton = amIModerator && allowStartStopRecording;
return (
<div>
{amIModerator ? (
{showButton ? (
<Tooltip
title={buttonTitle}
>
......@@ -96,7 +100,7 @@ class RecordingIndicator extends React.PureComponent {
</Tooltip>
) : null }
{amIModerator ? null : (
{showButton ? null : (
<Tooltip
title={`${intl.formatMessage(recording
? intlMessages.notificationRecordingStart
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment