diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-08-14 19:26:38 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-08-14 19:26:38 +0300 |
commit | ece011f6aee8ffffe161da2788ab317b78fe388f (patch) | |
tree | 0fd277a7671948094d40fda2cb535a2f45d86f2a | |
parent | 43d14f8b2b25c2b4b536f747a151b92a7bb014f0 (diff) | |
parent | 843478ac40b7718f1096a75295522487f0ca6dbe (diff) | |
download | wekan-ece011f6aee8ffffe161da2788ab317b78fe388f.tar.gz wekan-ece011f6aee8ffffe161da2788ab317b78fe388f.tar.bz2 wekan-ece011f6aee8ffffe161da2788ab317b78fe388f.zip |
Merge pull request #2620 from jymcheong/master
Webhook cardDetails onRendered
-rw-r--r-- | client/components/cards/cardDetails.js | 29 | ||||
-rw-r--r-- | server/statistics.js | 10 |
2 files changed, 34 insertions, 5 deletions
diff --git a/client/components/cards/cardDetails.js b/client/components/cards/cardDetails.js index 781967ae..f52661b7 100644 --- a/client/components/cards/cardDetails.js +++ b/client/components/cards/cardDetails.js @@ -117,6 +117,35 @@ BlazeComponent.extendComponent({ }, onRendered() { + // 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({ diff --git a/server/statistics.js b/server/statistics.js index 288a5089..997fd86f 100644 --- a/server/statistics.js +++ b/server/statistics.js @@ -22,7 +22,7 @@ Meteor.methods({ let nodeVersion = process.version; nodeVersion = nodeVersion.replace('v', ''); statistics.process = { - nodeVersion: nodeVersion, + nodeVersion, pid: process.pid, uptime: process.uptime(), }; @@ -30,7 +30,7 @@ Meteor.methods({ let meteorVersion = Meteor.release; meteorVersion = meteorVersion.replace('METEOR@', ''); statistics.meteor = { - meteorVersion: meteorVersion, + meteorVersion, }; // Thanks to RocketChat for MongoDB version detection ! // https://github.com/RocketChat/Rocket.Chat/blob/develop/app/utils/server/functions/getMongoInfo.js @@ -59,9 +59,9 @@ Meteor.methods({ } } statistics.mongo = { - mongoVersion: mongoVersion, - mongoStorageEngine: mongoStorageEngine, - mongoOplogEnabled: mongoOplogEnabled, + mongoVersion, + mongoStorageEngine, + mongoOplogEnabled, }; return statistics; }, |