From 510407467c5245f13fb9508b6e95f6b490dcd36b Mon Sep 17 00:00:00 2001 From: "Sam X. Chen" Date: Fri, 30 Aug 2019 10:36:17 -0400 Subject: Add Feature: enable two-way webhooks - add comments need userid --- server/notifications/outgoing.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js index 6fe90d93..1dc3d805 100644 --- a/server/notifications/outgoing.js +++ b/server/notifications/outgoing.js @@ -55,11 +55,15 @@ Meteor.methods({ }, }); } else { - CardComments.insert({ - text: newComment, - cardId, - boardId, - }); + const userId = data.userId; + if (userId) { + CardComments.insert({ + text: newComment, + userId, + cardId, + boardId, + }); + } } } }, -- cgit v1.2.3-1-g7c22