bigbluebutton-Github/bigbluebutton-html5/imports/api/presentations/server/handlers/presentationExport.js

23 lines
923 B
JavaScript

import { check } from 'meteor/check';
import sendExportedPresentationChatMsg from '/imports/api/presentations/server/handlers/sendExportedPresentationChatMsg';
import setPresentationExporting from '/imports/api/presentations/server/modifiers/setPresentationExporting';
import setOriginalUriDownload from '/imports/api/presentations/server/modifiers/setOriginalUriDownload';
export default async function handlePresentationExport({ body }, meetingId) {
check(body, Object);
check(meetingId, String);
const { fileURI, presId, typeOfExport } = body;
check(fileURI, String);
check(presId, String);
check(typeOfExport, Match.Maybe(String));
if (typeOfExport === "Original") {
setOriginalUriDownload(meetingId, presId, fileURI)
} else {
await sendExportedPresentationChatMsg(meetingId, presId, fileURI, typeOfExport);
}
await setPresentationExporting(meetingId, presId, { status: 'EXPORTED' });
}