The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/apps/meteor/ee/server/startup/deviceManagement.ts

20 lines
621 B

import { License } from '@rocket.chat/license';
import { addSettings } from '../settings/deviceManagement';
let stopListening: (() => void) | undefined;
License.onToggledFeature('device-management', {
up: async () => {
const { createPermissions, createEmailTemplates } = await import('../lib/deviceManagement/startup');
const { listenSessionLogin } = await import('../lib/deviceManagement/session');
await addSettings();
await createPermissions();
await createEmailTemplates();
stopListening = await listenSessionLogin();
},
down: async () => {
stopListening?.();
stopListening = undefined;
},
});