mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
f3147af2f7
69 changed files with 274 additions and 62 deletions
|
|
@ -7,8 +7,8 @@ template(name="board")
|
|||
+boardBody
|
||||
else
|
||||
//-- XXX We need a better error message in case the board has been archived
|
||||
//-- +message(label="board-not-found")
|
||||
| {{goHome}}
|
||||
+message(label="board-not-found")
|
||||
//-- | {{goHome}}
|
||||
else
|
||||
+spinner
|
||||
|
||||
|
|
|
|||
|
|
@ -117,6 +117,37 @@ BlazeComponent.extendComponent({
|
|||
},
|
||||
|
||||
onRendered() {
|
||||
if (Meteor.settings.public.CARD_OPENED_WEBHOOK_ENABLED) {
|
||||
// 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,
|
||||
boardId: card.boardId,
|
||||
listId: card.listId,
|
||||
user: Meteor.user().username,
|
||||
url: '',
|
||||
};
|
||||
//console.log('looking for integrations...');
|
||||
const integrations = Integrations.find({
|
||||
boardId: card.boardId,
|
||||
type: 'outgoing-webhooks',
|
||||
enabled: true,
|
||||
activities: { $in: ['CardDetailsRendered', 'all'] },
|
||||
}).fetch();
|
||||
//console.log(`Investigation length: ${integrations.length}`);
|
||||
if (integrations.length > 0) {
|
||||
Meteor.call('outgoingWebhooks', integrations, 'CardSelected', params);
|
||||
}
|
||||
//-------------
|
||||
}
|
||||
|
||||
if (!Utils.isMiniScreen()) {
|
||||
Meteor.setTimeout(() => {
|
||||
$('.card-details').mCustomScrollbar({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue