summaryrefslogtreecommitdiffstats
path: root/models/activities.js
diff options
context:
space:
mode:
authorAndrés Manelli <andresmanelli@gmail.com>2017-08-29 14:41:11 -0300
committerAndrés Manelli <andresmanelli@gmail.com>2017-08-30 00:56:09 -0300
commitf566022aa4cdddf20dd040c8fdc42b83f2cc340e (patch)
tree9ccbb322cc9c32f988071cddaa89e6f803987000 /models/activities.js
parentddc21046b9385ac5ce5bbb9a773484fcd056d10c (diff)
downloadwekan-f566022aa4cdddf20dd040c8fdc42b83f2cc340e.tar.gz
wekan-f566022aa4cdddf20dd040c8fdc42b83f2cc340e.tar.bz2
wekan-f566022aa4cdddf20dd040c8fdc42b83f2cc340e.zip
Add activity subscription to integrations. Add API for integrations. Allow multiple integrations per board
Diffstat (limited to 'models/activities.js')
-rw-r--r--models/activities.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/activities.js b/models/activities.js
index 208dd629..c732a940 100644
--- a/models/activities.js
+++ b/models/activities.js
@@ -140,9 +140,9 @@ if (Meteor.isServer) {
Notifications.notify(user, title, description, params);
});
- const integration = Integrations.findOne({ boardId: board._id, type: 'outgoing-webhooks', enabled: true });
- if (integration) {
- Meteor.call('outgoingWebhooks', integration, description, params);
+ const integrations = Integrations.find({ boardId: board._id, type: 'outgoing-webhooks', enabled: true, activities: { '$in': [description, 'all'] } }).fetch();
+ if (integrations.length > 0) {
+ Meteor.call('outgoingWebhooks', integrations, description, params);
}
});
}