2016-04-20 01:43:31 +08:00
|
|
|
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,
|
2016-04-20 05:16:32 +08:00
|
|
|
}
|
2016-04-20 01:43:31 +08:00
|
|
|
};
|
2016-04-20 05:16:32 +08:00
|
|
|
message = appendMessageHeader('eject_user_from_meeting_request_message', message);
|
2016-04-20 01:43:31 +08:00
|
|
|
return publish(Meteor.config.redis.channels.toBBBApps.users, message);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
});
|