mirror of
https://github.com/wekan/wekan.git
synced 2026-01-04 00:28:49 +01:00
Add activity subscription to integrations. Add API for integrations. Allow multiple integrations per board
This commit is contained in:
parent
ddc21046b9
commit
f566022aa4
3 changed files with 152 additions and 17 deletions
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue