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/v047.js

32 lines
809 B

import { Migrations } from '../../../app/migrations';
import { Settings } from '../../../app/models';
Migrations.add({
version: 47,
up() {
if (Settings) {
const autolinkerUrls = Settings.findOne({ _id: 'AutoLinker_Urls' });
if (autolinkerUrls) {
Settings.remove({ _id: 'AutoLinker_Urls' });
Settings.upsert({ _id: 'AutoLinker_Urls_Scheme' }, {
$set: {
value: !!autolinkerUrls.value,
i18nLabel: 'AutoLinker_Urls_Scheme',
},
});
Settings.upsert({ _id: 'AutoLinker_Urls_www' }, {
$set: {
value: !!autolinkerUrls.value,
i18nLabel: 'AutoLinker_Urls_www',
},
});
Settings.upsert({ _id: 'AutoLinker_Urls_TLD' }, {
$set: {
value: !!autolinkerUrls.value,
i18nLabel: 'AutoLinker_Urls_TLD',
},
});
}
}
},
});