summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorLauri Ojansivu <x@xet7.org>2019-11-05 16:30:51 +0200
committerGitHub <noreply@github.com>2019-11-05 16:30:51 +0200
commit52129ed7143a158dd228b5ce35b77d5d06dd1e77 (patch)
treeebde49f0a4787ab036cf33a278e820f988bb71e5 /client
parente868f9dcee79fba59bdc4e93f3798483e3759663 (diff)
parentd84ea7d16fc9fa45d17cbe91d63035436f55343a (diff)
downloadwekan-52129ed7143a158dd228b5ce35b77d5d06dd1e77.tar.gz
wekan-52129ed7143a158dd228b5ce35b77d5d06dd1e77.tar.bz2
wekan-52129ed7143a158dd228b5ce35b77d5d06dd1e77.zip
Merge pull request #2782 from jymcheong/master
fixed #2780
Diffstat (limited to 'client')
-rw-r--r--client/components/cards/cardDetails.js26
1 files changed, 15 insertions, 11 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js
index 2c74985f..2944b56c 100644
--- a/client/components/cards/cardDetails.js
+++ b/client/components/cards/cardDetails.js
@@ -121,11 +121,6 @@ BlazeComponent.extendComponent({
// Send Webhook but not create Activities records ---
const card = this.currentData();
const userId = Meteor.userId();
- //console.log(`userId: ${userId}`);
- //console.log(`cardId: ${card._id}`);
- //console.log(`boardId: ${card.boardId}`);
- //console.log(`listId: ${card.listId}`);
- //console.log(`swimlaneId: ${card.swimlaneId}`);
const params = {
userId,
cardId: card._id,
@@ -134,16 +129,25 @@ BlazeComponent.extendComponent({
user: Meteor.user().username,
url: '',
};
- //console.log('looking for integrations...');
- const integrations = Integrations.find({
- boardId: card.boardId,
- type: 'outgoing-webhooks',
+
+ const integrations = Integrations.find({
+ boardId: { $in: [card.boardId, Integrations.Const.GLOBAL_WEBHOOK_ID] },
enabled: true,
activities: { $in: ['CardDetailsRendered', 'all'] },
}).fetch();
- //console.log(`Investigation length: ${integrations.length}`);
+
if (integrations.length > 0) {
- Meteor.call('outgoingWebhooks', integrations, 'CardSelected', params);
+ integrations.forEach(integration => {
+ Meteor.call(
+ 'outgoingWebhooks',
+ integration,
+ 'CardSelected',
+ params,
+ () => {
+ return;
+ },
+ );
+ });
}
//-------------
}