diff --git a/bigbluebutton-html5/app/server/collection_methods/slides.js b/bigbluebutton-html5/app/server/collection_methods/slides.js index a5377982c8..3a2ddc012f 100755 --- a/bigbluebutton-html5/app/server/collection_methods/slides.js +++ b/bigbluebutton-html5/app/server/collection_methods/slides.js @@ -13,11 +13,15 @@ this.displayThisSlide = function(meetingId, newSlideId, slideObject) { "slide.current": false } }); - // for the new slide: remove the version which came with presentation_shared_message from the Collection - // to avoid using old data (this message contains everything we need for the new slide) - removeSlideFromCollection(meetingId, newSlideId); - // add the new slide to the collection - return addSlideToCollection(meetingId, presentationId, slideObject); + + Meteor.Slides.update({ + presentationId: presentationId, + "slide.id": newSlideId + }, { + $set: { + "slide.current": true + } + }); }; this.addSlideToCollection = function(meetingId, presentationId, slideObject) { @@ -48,23 +52,6 @@ this.addSlideToCollection = function(meetingId, presentationId, slideObject) { } }; -this.removeSlideFromCollection = function(meetingId, slideId) { - let id; - if((meetingId != null) && (slideId != null) && (Meteor.Slides.findOne({ - meetingId: meetingId, - "slide.id": slideId - }) != null)) { - id = Meteor.Slides.findOne({ - meetingId: meetingId, - "slide.id": slideId - }); - if(id != null) { - Meteor.Slides.remove(id._id); - return Meteor.log.info(`----removed slide[${slideId}] from ${meetingId}`); - } - } -}; - // called on server start and meeting end this.clearSlidesCollection = function(meetingId) { if(meetingId != null) {