Merge pull request #19153 from Scroody/pid-null-error-fix
fix (bbb-web): Null pointer exception when parent meeting does not exist
This commit is contained in:
commit
1f14f9a333
@ -1152,6 +1152,11 @@ public class ParamsProcessorUtil {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean parentMeetingExists(String parentMeetingId) {
|
||||||
|
Meeting meeting = ServiceUtils.findMeetingFromMeetingID(parentMeetingId);
|
||||||
|
return meeting != null;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************
|
/*************************************************
|
||||||
* Setters
|
* Setters
|
||||||
************************************************/
|
************************************************/
|
||||||
|
@ -130,10 +130,21 @@ class ApiController {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
if(params.isBreakout == "true" && !params.parentMeetingID) {
|
Boolean isBreakoutRoom = false
|
||||||
|
if (!StringUtils.isEmpty(params.isBreakout)) {
|
||||||
|
isBreakoutRoom = Boolean.parseBoolean(params.isBreakout)
|
||||||
|
}
|
||||||
|
|
||||||
|
if(isBreakoutRoom) {
|
||||||
|
if(StringUtils.isEmpty(params.parentMeetingID)) {
|
||||||
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
invalid("parentMeetingIDMissing", "No parent meeting ID was provided for the breakout room")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if(!paramsProcessorUtil.parentMeetingExists(params.parentMeetingID)) {
|
||||||
|
invalid("parentMeetingDoesNotExist", "No parent meeting exists for the breakout room")
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
// Ensure unique TelVoice. Uniqueness is not guaranteed by paramsProcessorUtil.
|
||||||
if (!params.voiceBridge) {
|
if (!params.voiceBridge) {
|
||||||
|
Loading…
Reference in New Issue
Block a user