2020-09-01 20:07:56 +08:00
|
|
|
import AuthTokenValidation from '/imports/api/auth-token-validation';
|
|
|
|
import Logger from '/imports/startup/server/logger';
|
|
|
|
import ClientConnections from '/imports/startup/server/ClientConnections';
|
|
|
|
|
2023-03-16 20:19:53 +08:00
|
|
|
export default async function clearAuthTokenValidation(meetingId) {
|
|
|
|
try {
|
|
|
|
await AuthTokenValidation.removeAsync({ meetingId });
|
2021-07-01 04:08:00 +08:00
|
|
|
if (!process.env.BBB_HTML5_ROLE || process.env.BBB_HTML5_ROLE === 'frontend') {
|
|
|
|
ClientConnections.removeMeeting(meetingId);
|
|
|
|
}
|
2020-09-01 20:07:56 +08:00
|
|
|
Logger.info(`Cleared AuthTokenValidation (${meetingId})`);
|
2023-03-16 20:19:53 +08:00
|
|
|
} catch (error) {
|
|
|
|
Logger.info(`Error when removing auth-token-validation for meeting=${meetingId}`);
|
|
|
|
}
|
2020-09-01 20:07:56 +08:00
|
|
|
}
|