mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
parent
7318e42080
commit
d84ea7d16f
1 changed files with 15 additions and 11 deletions
|
|
@ -121,11 +121,6 @@ BlazeComponent.extendComponent({
|
||||||
// Send Webhook but not create Activities records ---
|
// Send Webhook but not create Activities records ---
|
||||||
const card = this.currentData();
|
const card = this.currentData();
|
||||||
const userId = Meteor.userId();
|
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 = {
|
const params = {
|
||||||
userId,
|
userId,
|
||||||
cardId: card._id,
|
cardId: card._id,
|
||||||
|
|
@ -134,16 +129,25 @@ BlazeComponent.extendComponent({
|
||||||
user: Meteor.user().username,
|
user: Meteor.user().username,
|
||||||
url: '',
|
url: '',
|
||||||
};
|
};
|
||||||
//console.log('looking for integrations...');
|
|
||||||
const integrations = Integrations.find({
|
const integrations = Integrations.find({
|
||||||
boardId: card.boardId,
|
boardId: { $in: [card.boardId, Integrations.Const.GLOBAL_WEBHOOK_ID] },
|
||||||
type: 'outgoing-webhooks',
|
|
||||||
enabled: true,
|
enabled: true,
|
||||||
activities: { $in: ['CardDetailsRendered', 'all'] },
|
activities: { $in: ['CardDetailsRendered', 'all'] },
|
||||||
}).fetch();
|
}).fetch();
|
||||||
//console.log(`Investigation length: ${integrations.length}`);
|
|
||||||
if (integrations.length > 0) {
|
if (integrations.length > 0) {
|
||||||
Meteor.call('outgoingWebhooks', integrations, 'CardSelected', params);
|
integrations.forEach(integration => {
|
||||||
|
Meteor.call(
|
||||||
|
'outgoingWebhooks',
|
||||||
|
integration,
|
||||||
|
'CardSelected',
|
||||||
|
params,
|
||||||
|
() => {
|
||||||
|
return;
|
||||||
|
},
|
||||||
|
);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
//-------------
|
//-------------
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue