[I-18101-back-end] - back-end portion

This commit is contained in:
GuiLeme 2023-06-16 09:24:50 -03:00
parent 54fa11e876
commit f36ffbe949

View File

@ -146,10 +146,9 @@ trait MakePresentationDownloadReqMsgHdlr extends RightsManagementTrait {
val exportJob: ExportJob = new ExportJob(jobId, JobTypes.DOWNLOAD, "annotated_slides", presId, presLocation, allPages, pagesRange, meetingId, "");
val storeAnnotationPages: List[PresentationPageForExport] = getPresentationPagesForExport(pagesRange, pageCount, presId, currentPres, liveMeeting);
val annotationCount: Int = storeAnnotationPages.map(_.annotations.size).sum
val isOriginalPresentationType = m.body.typeOfExport == "Original"
if (!isOriginalPresentationType && annotationCount > 0) {
if (!isOriginalPresentationType) {
// Send Export Job to Redis
val job = buildStoreExportJobInRedisSysMsg(exportJob, liveMeeting)
bus.outGW.send(job)
@ -157,9 +156,7 @@ trait MakePresentationDownloadReqMsgHdlr extends RightsManagementTrait {
// Send Annotations to Redis
val annotations = StoredAnnotations(jobId, presId, storeAnnotationPages)
bus.outGW.send(buildStoreAnnotationsInRedisSysMsg(annotations, liveMeeting))
} else if (!isOriginalPresentationType && annotationCount == 0) {
log.error("There are no annotations for presentation with Id {}... Ignoring", presId)
} else if (isOriginalPresentationType) {
} else {
// Return existing uploaded file directly
val convertedFileName = currentPres.get.filenameConverted
val filename = if (convertedFileName == "") currentPres.get.name else convertedFileName