remove unused voice-user method

This commit is contained in:
KDSBrowne 2017-10-04 07:39:13 -07:00
parent 83d4474b51
commit e241d6bf68
2 changed files with 5 additions and 29 deletions

View File

@ -2,12 +2,10 @@ import { Meteor } from 'meteor/meteor';
import mapToAcl from '/imports/startup/mapToAcl';
import listenOnlyToggle from './methods/listenOnlyToggle';
import muteToggle from './methods/muteToggle';
import kickVoiceUser from './methods/kickVoiceUser';
Meteor.methods(mapToAcl(['methods.listenOnlyToggle', 'methods.toggleSelfVoice', 'methods.toggleVoice',
'methods.kickVoiceUser'], {
listenOnlyToggle,
toggleSelfVoice: (credentials) => { muteToggle(credentials, credentials.requesterUserId); },
toggleVoice: muteToggle,
kickVoiceUser,
}));
], {
listenOnlyToggle,
toggleSelfVoice: (credentials) => { muteToggle(credentials, credentials.requesterUserId); },
toggleVoice: muteToggle,
}));

View File

@ -1,22 +0,0 @@
import { Meteor } from 'meteor/meteor';
import { check } from 'meteor/check';
import RedisPubSub from '/imports/startup/server/redis2x';
export default function kickVoiceUser(credentials, userId) {
const REDIS_CONFIG = Meteor.settings.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const EVENT_NAME = 'EjectUserFromVoiceCmdMsg';
const { requesterUserId, meetingId } = credentials;
check(meetingId, String);
check(requesterUserId, String);
check(userId, String);
const payload = {
userId,
ejectedBy: requesterUserId,
};
return RedisPubSub.publishUserMessage(CHANNEL, EVENT_NAME, meetingId, requesterUserId, payload);
}