Skip to content
Snippets Groups Projects
Unverified Commit 5c6ef240 authored by Anton Georgiev's avatar Anton Georgiev Committed by GitHub
Browse files

Merge pull request #7525 from antobinary/deny-incorrect-presentationId

Handle incorrect presentationId passed from client
parents 0b71172e 0287e00b
No related branches found
No related tags found
No related merge requests found
......@@ -18,17 +18,22 @@ export default function setPresentation(credentials, presentationId, podId) {
meetingId,
id: presentationId,
podId,
current: true,
});
if (currentPresentation && currentPresentation.id === presentationId) {
return Promise.resolve();
}
if (currentPresentation) {
if (currentPresentation.current) {
return Promise.resolve();
}
const payload = {
presentationId,
podId,
};
const payload = {
presentationId,
podId,
};
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload);
}
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload);
// did not find presentation with such id. abandon
// return Promise.resolve(); // will close the uploading modal
throw new Meteor.Error('presentation-not-found', `Did not find a presentation with id ${presentationId} in method setPresentation`);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment