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/app/settings/server/observer.js

19 lines
429 B

import { Meteor } from 'meteor/meteor';
import { Settings } from '../../models/server';
import { setValue } from './raw';
const updateValue = (id, fields) => {
if (typeof fields.value === 'undefined') {
return;
}
setValue(id, fields.value);
};
Meteor.startup(() => Settings.find({}, { fields: { value: 1 } }).observeChanges({
added: updateValue,
changed: updateValue,
removed(id) {
setValue(id, undefined);
},
}));