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/upsell.ts

20 lines
473 B

import { Meteor } from 'meteor/meteor';
import { Settings } from '@rocket.chat/models';
import { onValidateLicenses, getLicenses } from '../../app/license/server/license';
const handleHadTrial = (): void => {
getLicenses().forEach(({ valid, license }): void => {
if (!valid) {
return;
}
if (license.meta?.trial) {
void Settings.updateValueById('Cloud_Workspace_Had_Trial', true);
}
});
};
Meteor.startup(() => {
onValidateLicenses(handleHadTrial);
});