2017-08-01 23:00:07 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
2017-10-12 10:00:28 +08:00
|
|
|
import VoiceUsers from '/imports/api/voice-users';
|
2017-08-01 23:00:07 +08:00
|
|
|
|
|
|
|
export default function clearVoiceUser(meetingId) {
|
|
|
|
if (meetingId) {
|
2018-12-15 04:19:10 +08:00
|
|
|
return VoiceUsers.remove({ meetingId }, () => {
|
2019-04-06 02:10:05 +08:00
|
|
|
Logger.info(`Cleared VoiceUsers in (${meetingId})`);
|
2018-12-15 04:19:10 +08:00
|
|
|
});
|
2017-08-01 23:00:07 +08:00
|
|
|
}
|
|
|
|
|
2018-12-15 04:19:10 +08:00
|
|
|
return VoiceUsers.remove({}, () => {
|
2019-04-06 02:10:05 +08:00
|
|
|
Logger.info('Cleared VoiceUsers in all meetings');
|
2018-12-15 04:19:10 +08:00
|
|
|
});
|
2017-08-01 23:00:07 +08:00
|
|
|
}
|