bigbluebutton-Github/bigbluebutton-html5/imports/api/users/server/modifiers/addDialInUser.js

32 lines
768 B
JavaScript
Raw Normal View History

2018-08-16 20:21:13 +08:00
import { check } from 'meteor/check';
import addUser from '/imports/api/users/server/modifiers/addUser';
export default function addDialInUser(meetingId, voiceUser) {
check(meetingId, String);
check(voiceUser, Object);
const USER_CONFIG = Meteor.settings.public.user;
const ROLE_VIEWER = USER_CONFIG.role_viewer;
const { intId, callerName } = voiceUser;
const voiceOnlyUser = {
intId,
extId: intId, // TODO
name: callerName,
role: ROLE_VIEWER.toLowerCase(),
2022-01-20 02:35:04 +08:00
guest: true,
2018-08-16 20:21:13 +08:00
authed: true,
2022-02-03 05:07:18 +08:00
waitingForAcceptance: false,
guestStatus: 'ALLOW',
2018-08-16 20:21:13 +08:00
emoji: 'none',
presenter: false,
locked: false, // TODO
avatar: '',
pin: false,
2018-08-16 20:21:13 +08:00
clientType: 'dial-in-user',
};
return addUser(meetingId, voiceOnlyUser);
}