Avoid set negative values in Extend time for breakout rooms

This commit is contained in:
Gustavo Trott 2021-06-02 17:36:43 -03:00
parent 2551f71d7c
commit 02ef1186be
3 changed files with 6 additions and 1 deletions

View File

@ -19,6 +19,9 @@ trait ExtendBreakoutRoomsTimeMsgHdlr extends RightsManagementTrait {
val reason = "No permission to extend time for breakout rooms for meeting."
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, outGW, liveMeeting)
state
} else if (msg.body.extendTimeInMinutes <= 0) {
log.error("Error while trying to extend {} minutes for breakout rooms time in meeting {}. Only positive values are allowed!", msg.body.extendTimeInMinutes, props.meetingProp.intId)
state
} else {
val updatedModel = for {
breakoutModel <- state.breakout

View File

@ -174,7 +174,8 @@ class BreakoutRoom extends PureComponent {
}
changeExtendTime(event) {
this.setState({ extendTime: Number.parseInt(event.target.value, 10) || 0 });
const newExtendTime = Number.parseInt(event.target.value, 10) || 0;
this.setState({ extendTime: newExtendTime >= 0 ? newExtendTime : 0 });
}
showExtendTimeForm() {

View File

@ -39,6 +39,7 @@ const requestJoinURL = (breakoutId) => {
};
const extendBreakoutsTime = (extendTimeInMinutes) => {
if (extendTimeInMinutes <= 0) return;
makeCall('extendBreakoutsTime', {
extendTimeInMinutes,
});