diff --git a/bigbluebutton-html5/imports/api/polls/server/publishers.js b/bigbluebutton-html5/imports/api/polls/server/publishers.js index 53ebb41711f7c3ad478a978a50b188979647945b..85bbd08b0612f7a57df8768241dfad3ad51939d5 100644 --- a/bigbluebutton-html5/imports/api/polls/server/publishers.js +++ b/bigbluebutton-html5/imports/api/polls/server/publishers.js @@ -29,7 +29,6 @@ function publishCurrentPoll(...args) { Meteor.publish('current-poll', publishCurrentPoll); - function polls() { const tokenValidation = AuthTokenValidation.findOne({ connectionId: this.connection.id }); @@ -38,6 +37,13 @@ function polls() { return Polls.find({ meetingId: '' }); } + const options = { + fields: { + 'answers.numVotes': 0, + responses: 0, + }, + }; + const { meetingId, userId } = tokenValidation; Logger.debug('Publishing polls', { meetingId, userId }); @@ -47,7 +53,7 @@ function polls() { users: userId, }; - return Polls.find(selector); + return Polls.find(selector, options); } function publish(...args) {