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/packages/rocketchat-integrations/server/models/Integrations.js

17 lines
445 B

RocketChat.models.Integrations = new class Integrations extends RocketChat.models._Base {
constructor() {
super('integrations');
}
findByType(type, options) {
if (type !== 'webhook-incoming' && type !== 'webhook-outgoing') {
throw new Meteor.Error('invalid-type-to-find');
}
return this.find({ type }, options);
}
disableByUserId(userId) {
return this.update({ userId }, { $set: { enabled: false }}, { multi: true });
}
};