0bc62f66f4
Updating random user picker to reduce the probability that the exact same viewers would be selected first in successive random-pick runs
15 lines
426 B
JavaScript
15 lines
426 B
JavaScript
import { check } from 'meteor/check';
|
|
import updateRandomViewer from '../modifiers/updateRandomViewer';
|
|
|
|
export default function randomlySelectedUser({ header, body }) {
|
|
const { userIds, choice, requestedBy } = body;
|
|
const { meetingId } = header;
|
|
|
|
check(meetingId, String);
|
|
check(requestedBy, String);
|
|
check(userIds, Array);
|
|
check(choice, String);
|
|
|
|
updateRandomViewer(meetingId, userIds, choice, requestedBy);
|
|
}
|