2017-10-12 10:00:28 +08:00
|
|
|
import Meetings from '/imports/api/meetings';
|
2016-10-22 00:27:47 +08:00
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
|
2020-09-19 03:30:20 +08:00
|
|
|
import BannedUsers from '/imports/api/users/server/store/bannedUsers';
|
2019-10-23 09:26:25 +08:00
|
|
|
import { removeAnnotationsStreamer } from '/imports/api/annotations/server/streamer';
|
2019-10-25 04:48:03 +08:00
|
|
|
import { removeCursorStreamer } from '/imports/api/cursor/server/streamer';
|
2019-10-23 09:26:25 +08:00
|
|
|
|
2017-10-12 10:00:28 +08:00
|
|
|
import clearUsers from '/imports/api/users/server/modifiers/clearUsers';
|
2018-09-14 02:09:30 +08:00
|
|
|
import clearUsersSettings from '/imports/api/users-settings/server/modifiers/clearUsersSettings';
|
2018-08-06 20:05:07 +08:00
|
|
|
import clearGroupChat from '/imports/api/group-chat/server/modifiers/clearGroupChat';
|
2017-10-12 10:00:28 +08:00
|
|
|
import clearBreakouts from '/imports/api/breakouts/server/modifiers/clearBreakouts';
|
|
|
|
import clearAnnotations from '/imports/api/annotations/server/modifiers/clearAnnotations';
|
|
|
|
import clearSlides from '/imports/api/slides/server/modifiers/clearSlides';
|
|
|
|
import clearPolls from '/imports/api/polls/server/modifiers/clearPolls';
|
|
|
|
import clearCaptions from '/imports/api/captions/server/modifiers/clearCaptions';
|
2018-09-20 01:48:15 +08:00
|
|
|
import clearPresentationPods from '/imports/api/presentation-pods/server/modifiers/clearPresentationPods';
|
2017-10-12 10:00:28 +08:00
|
|
|
import clearVoiceUsers from '/imports/api/voice-users/server/modifiers/clearVoiceUsers';
|
2019-04-06 06:32:21 +08:00
|
|
|
import clearUserInfo from '/imports/api/users-infos/server/modifiers/clearUserInfo';
|
2020-04-10 01:01:46 +08:00
|
|
|
import clearConnectionStatus from '/imports/api/connection-status/server/modifiers/clearConnectionStatus';
|
2019-03-29 02:47:11 +08:00
|
|
|
import clearNote from '/imports/api/note/server/modifiers/clearNote';
|
2019-05-24 02:25:31 +08:00
|
|
|
import clearNetworkInformation from '/imports/api/network-information/server/modifiers/clearNetworkInformation';
|
2019-07-29 22:17:38 +08:00
|
|
|
import clearLocalSettings from '/imports/api/local-settings/server/modifiers/clearLocalSettings';
|
2019-08-27 20:53:53 +08:00
|
|
|
import clearRecordMeeting from './clearRecordMeeting';
|
2020-02-19 06:03:06 +08:00
|
|
|
import clearVoiceCallStates from '/imports/api/voice-call-states/server/modifiers/clearVoiceCallStates';
|
2020-06-04 00:29:44 +08:00
|
|
|
import clearVideoStreams from '/imports/api/video-streams/server/modifiers/clearVideoStreams';
|
2020-09-01 20:07:56 +08:00
|
|
|
import clearAuthTokenValidation from '/imports/api/auth-token-validation/server/modifiers/clearAuthTokenValidation';
|
2020-12-16 00:10:39 +08:00
|
|
|
import Metrics from '/imports/startup/server/metrics';
|
2018-09-20 01:48:15 +08:00
|
|
|
|
2019-04-06 02:10:05 +08:00
|
|
|
export default function meetingHasEnded(meetingId) {
|
2019-10-23 09:26:25 +08:00
|
|
|
removeAnnotationsStreamer(meetingId);
|
2019-10-25 04:48:03 +08:00
|
|
|
removeCursorStreamer(meetingId);
|
2019-10-23 09:26:25 +08:00
|
|
|
|
2017-10-12 06:17:42 +08:00
|
|
|
return Meetings.remove({ meetingId }, () => {
|
|
|
|
clearCaptions(meetingId);
|
2018-08-06 20:05:07 +08:00
|
|
|
clearGroupChat(meetingId);
|
2018-09-20 01:48:15 +08:00
|
|
|
clearPresentationPods(meetingId);
|
2017-10-12 06:17:42 +08:00
|
|
|
clearBreakouts(meetingId);
|
|
|
|
clearPolls(meetingId);
|
|
|
|
clearAnnotations(meetingId);
|
|
|
|
clearSlides(meetingId);
|
|
|
|
clearUsers(meetingId);
|
2018-09-14 02:09:30 +08:00
|
|
|
clearUsersSettings(meetingId);
|
2017-10-12 06:17:42 +08:00
|
|
|
clearVoiceUsers(meetingId);
|
2019-04-06 06:32:21 +08:00
|
|
|
clearUserInfo(meetingId);
|
2020-04-10 01:01:46 +08:00
|
|
|
clearConnectionStatus(meetingId);
|
2019-03-29 02:47:11 +08:00
|
|
|
clearNote(meetingId);
|
2019-05-24 02:25:31 +08:00
|
|
|
clearNetworkInformation(meetingId);
|
2019-07-29 22:17:38 +08:00
|
|
|
clearLocalSettings(meetingId);
|
2019-08-27 20:53:53 +08:00
|
|
|
clearRecordMeeting(meetingId);
|
2020-02-19 06:03:06 +08:00
|
|
|
clearVoiceCallStates(meetingId);
|
2020-06-04 00:29:44 +08:00
|
|
|
clearVideoStreams(meetingId);
|
2020-09-01 20:07:56 +08:00
|
|
|
clearAuthTokenValidation(meetingId);
|
2020-09-09 00:56:17 +08:00
|
|
|
BannedUsers.delete(meetingId);
|
2020-12-16 00:10:39 +08:00
|
|
|
Metrics.removeMeeting(meetingId);
|
2016-10-22 00:27:47 +08:00
|
|
|
|
2020-12-01 04:01:41 +08:00
|
|
|
Logger.info(`Cleared Meetings with id ${meetingId}`);
|
2017-10-12 06:17:42 +08:00
|
|
|
});
|
2017-06-03 03:25:02 +08:00
|
|
|
}
|