828cf60cb2
This patch adds a new option to hide the individual answers to the presenter when starting a poll. This includes hiding the answers for the presenter and informing the other users that the current poll is anonymous. See #9524
21 lines
576 B
JavaScript
21 lines
576 B
JavaScript
import { check } from 'meteor/check';
|
|
import addPoll from '../modifiers/addPoll';
|
|
import setPublishedPoll from '../../../meetings/server/modifiers/setPublishedPoll';
|
|
|
|
export default function pollStarted({ body }, meetingId) {
|
|
const {
|
|
userId, poll, pollType, secretPoll, question,
|
|
} = body;
|
|
|
|
check(meetingId, String);
|
|
check(userId, String);
|
|
check(poll, Object);
|
|
check(pollType, String);
|
|
check(secretPoll, Boolean);
|
|
check(question, String);
|
|
|
|
setPublishedPoll(meetingId, false);
|
|
|
|
return addPoll(meetingId, userId, poll, pollType, secretPoll, question);
|
|
}
|