Skip to content
Snippets Groups Projects
Commit 65ff7bca authored by Joao Siebel's avatar Joao Siebel
Browse files

Hide poll responses and number of votes for viewers in minimongo

parent 7c9397e7
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
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