Add captured slides to UploadingPresentations collection

This commit is contained in:
Daniel Petri Rocha 2022-11-22 21:07:43 +01:00
parent c7566b174d
commit b43863342b
4 changed files with 31 additions and 23 deletions

View File

@ -146,7 +146,7 @@ trait PresentationWithAnnotationsMsgHdlr extends RightsManagementTrait {
log.error(s"No presentation set in meeting ${meetingId}")
} else {
val jobId: String = RandomStringGenerator.randomAlphanumericString(16);
val jobId: String = s"${meetingId}-slides" // Used as the temporaryPresentationId upon upload
val jobType = "PresentationWithAnnotationExportJob"
val allPages: Boolean = m.allPages
val pageCount = currentPres.get.pages.size

View File

@ -33,6 +33,7 @@ function breakouts() {
shortName: 1,
timeRemaining: 1,
captureNotes: 1,
captureSlides: 1,
},
};

View File

@ -147,7 +147,7 @@ export default injectNotify(injectIntl(withTracker(({
if (fromBreakoutPanel) data.bold = true;
} else {
clearInterval(timeRemainingInterval);
BreakoutService.setCapturedNotesUploading();
BreakoutService.setCapturedContentUploading();
data.message = intl.formatMessage(timeEndedMessage || intlMessages.breakoutWillClose);
}
} else if (breakoutRoom) {

View File

@ -38,35 +38,42 @@ const getBreakoutRoomUrl = (breakoutId) => {
return breakoutUrlData;
};
const setCapturedNotesUploading = () => {
const upsertCapturedContent = (filename, temporaryPresentationId) => {
UploadingPresentations.upsert({
temporaryPresentationId,
}, {
$set: {
id: _.uniqueId(filename),
temporaryPresentationId,
progress: 0,
filename,
lastModifiedUploader: false,
upload: {
done: false,
error: false,
},
uploadTimestamp: new Date(),
},
});
};
const setCapturedContentUploading = () => {
const breakoutRooms = findBreakouts();
breakoutRooms.forEach((breakout) => {
const filename = breakout.shortName;
const temporaryPresentationId = breakout.breakoutId;
if (breakout.captureNotes) {
const filename = breakout.shortName;
const temporaryPresentationId = `${breakout.breakoutId}-notes`;
upsertCapturedContent(filename, `${temporaryPresentationId}-notes`);
}
UploadingPresentations.upsert({
temporaryPresentationId,
}, {
$set: {
id: _.uniqueId(filename),
temporaryPresentationId,
progress: 0,
filename,
lastModifiedUploader: false,
upload: {
done: false,
error: false,
},
uploadTimestamp: new Date(),
},
});
if (breakout.captureSlides) {
upsertCapturedContent(filename, `${temporaryPresentationId}-slides`);
}
});
};
const endAllBreakouts = () => {
setCapturedNotesUploading();
setCapturedContentUploading();
makeCall('endAllBreakouts');
};
@ -244,5 +251,5 @@ export default {
sortUsersByName: UserListService.sortUsersByName,
isUserInBreakoutRoom,
checkInviteModerators,
setCapturedNotesUploading,
setCapturedContentUploading,
};