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/server/startup/migrations/v137.js

14 lines
493 B

import { Migrations } from '../../../app/migrations';
import { Users, Settings } from '../../../app/models';
import { settings } from '../../../app/settings';
Migrations.add({
version: 137,
up() {
const firstUser = Users.getOldest({ emails: 1 });
const reportStats = settings.get('Statistics_reporting');
Settings.updateValueById('Organization_Email', firstUser && firstUser.emails && firstUser.emails[0].address);
Settings.updateValueById('Register_Server', reportStats);
},
});