bigbluebutton-Github/bigbluebutton-html5/server/methods/kickUser.js
2016-04-19 21:16:32 +00:00

20 lines
731 B
JavaScript

Meteor.methods({
//meetingId: the meeting where the user is
//toKickUserId: the userid of the user to kick
//requesterUserId: the userid of the user that wants to kick
//authToken: the authToken of the user that wants to kick
kickUser(meetingId, toKickUserId, requesterUserId, authToken) {
let message;
if (isAllowedTo('kickUser', meetingId, requesterUserId, authToken)) {
message = {
payload: {
userid: toKickUserId,
ejected_by: requesterUserId,
meeting_id: meetingId,
}
};
message = appendMessageHeader('eject_user_from_meeting_request_message', message);
return publish(Meteor.config.redis.channels.toBBBApps.users, message);
}
},
});