fix(bbb-web): fix plugins not loading nor running into breakout-rooms (#21525)

* [fix-breakouts-plugin] - Fix plugin not loading and not running into breakouts.

* [fix-breakouts-plugin] - simplifying createMeeting logic - changes in review
This commit is contained in:
Guilherme Pereira Leme 2024-10-24 22:15:27 -03:00 committed by GitHub
parent 6d4fa12de2
commit d1af76d8ff
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 38 additions and 14 deletions

View File

@ -99,6 +99,7 @@ trait CreateBreakoutRoomsCmdMsgHdlr extends RightsManagementTrait {
breakout.captureSlides,
breakout.captureNotesFilename,
breakout.captureSlidesFilename,
pluginProp = liveMeeting.props.pluginProp,
)
val event = buildCreateBreakoutRoomSysCmdMsg(liveMeeting.props.meetingProp.intId, roomDetail)

View File

@ -1,5 +1,7 @@
package org.bigbluebutton.common2.msgs
import java.util
object BreakoutRoomEndedEvtMsg { val NAME = "BreakoutRoomEndedEvtMsg" }
case class BreakoutRoomEndedEvtMsg(header: BbbClientMsgHeader, body: BreakoutRoomEndedEvtMsgBody) extends BbbCoreMsg
case class BreakoutRoomEndedEvtMsgBody(parentId: String, breakoutId: String)
@ -56,6 +58,7 @@ case class BreakoutRoomDetail(
captureSlides: Boolean,
captureNotesFilename: String,
captureSlidesFilename: String,
pluginProp: util.Map[String, AnyRef],
)
/**

View File

@ -464,15 +464,27 @@ public class MeetingService implements MessageListener {
}
return urlContents;
}
public synchronized boolean createMeeting(Meeting m) {
Map<String, Object> pluginsMap = new HashMap<>();
return createMeeting(m, pluginsMap);
}
public synchronized boolean createMeeting(Meeting m, Map<String, Object> plugins) {
String internalMeetingId = paramsProcessorUtil.convertToInternalMeetingId(m.getExternalId());
Meeting existingId = getNotEndedMeetingWithId(internalMeetingId);
Meeting existingTelVoice = getNotEndedMeetingWithTelVoice(m.getTelVoice());
Meeting existingWebVoice = getNotEndedMeetingWithWebVoice(m.getWebVoice());
if (existingId == null && existingTelVoice == null && existingWebVoice == null) {
meetings.put(m.getInternalId(), m);
Map<String, Object> requestedManifests = requestPluginManifests(m);
m.setPlugins(requestedManifests);
Map<String, Object> pluginsMap;
if (m.isBreakout()) {
pluginsMap = plugins;
} else {
pluginsMap = requestPluginManifests(m);
}
m.setPlugins(pluginsMap);
handle(new CreateMeeting(m));
return true;
}
@ -808,7 +820,7 @@ public class MeetingService implements MessageListener {
Meeting breakout = paramsProcessorUtil.processCreateParams(params);
createMeeting(breakout);
createMeeting(breakout, message.pluginProp);
presDownloadService.extractPresentationPage(message.parentMeetingId,
message.sourcePresentationId,

View File

@ -576,6 +576,7 @@ public class ParamsProcessorUtil {
// Parse Plugins Manifests from config and param
ArrayList<PluginManifest> listOfPluginManifests = new ArrayList<PluginManifest>();
if (!isBreakout){
//Process plugins from config
if (defaultPluginManifests != null && !defaultPluginManifests.isEmpty()) {
ArrayList<PluginManifest> pluginManifestsFromConfig = processPluginManifests(defaultPluginManifests);
@ -587,6 +588,7 @@ public class ParamsProcessorUtil {
ArrayList<PluginManifest> pluginManifestsFromParam = processPluginManifests(pluginManifestsParam);
listOfPluginManifests.addAll(pluginManifestsFromParam);
}
}
// Check if VirtualBackgrounds is disabled
if (!StringUtils.isEmpty(params.get(ApiParams.VIRTUAL_BACKGROUNDS_DISABLED))) {

View File

@ -1,5 +1,7 @@
package org.bigbluebutton.api.messaging.messages;
import java.util.Map;
public class CreateBreakoutRoom implements IMessage {
public final String meetingId;
@ -23,6 +25,7 @@ public class CreateBreakoutRoom implements IMessage {
public final Boolean captureSlides; // Upload annotated breakout slides to main room after breakout room end
public final String captureNotesFilename;
public final String captureSlidesFilename;
public final Map<String, Object> pluginProp;
public CreateBreakoutRoom(String meetingId,
String parentMeetingId,
@ -43,7 +46,8 @@ public class CreateBreakoutRoom implements IMessage {
Boolean captureNotes,
Boolean captureSlides,
String captureNotesFilename,
String captureSlidesFilename) {
String captureSlidesFilename,
Map<String, Object> pluginProp) {
this.meetingId = meetingId;
this.parentMeetingId = parentMeetingId;
this.name = name;
@ -64,5 +68,6 @@ public class CreateBreakoutRoom implements IMessage {
this.captureSlides = captureSlides;
this.captureNotesFilename = captureNotesFilename;
this.captureSlidesFilename = captureSlidesFilename;
this.pluginProp = pluginProp;
}
}

View File

@ -127,6 +127,7 @@ class OldMeetingMsgHdlrActor(val olgMsgGW: OldMessageReceivedGW)
msg.body.room.captureSlides,
msg.body.room.captureNotesFilename,
msg.body.room.captureSlidesFilename,
msg.body.room.pluginProp,
))
}