bigbluebutton-Github/bigbluebutton-html5/imports/api/meetings/server/handlers/selectRandomViewer.js
hiroshisuga 0bc62f66f4
Feat(meeting): minimise sequential user pick (#13831)
Updating random user picker to reduce the probability that the exact same viewers would be selected first in successive random-pick runs
2021-12-07 12:36:34 -05:00

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);
}