Merge pull request #3 from GuiLeme/I-18101-back-end

[I-18101-back-end] - back-end portion
This commit is contained in:
André Castro 2023-06-16 10:46:45 -03:00 committed by GitHub
commit 36ccf862a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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