Bladeren bron

Add Feature: enable two-way webhooks - add comments need userid

Sam X. Chen 5 jaren geleden
bovenliggende
commit
510407467c
1 gewijzigde bestanden met toevoegingen van 9 en 5 verwijderingen
  1. 9 5
      server/notifications/outgoing.js

+ 9 - 5
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,
+          });
+        }
       }
     }
   },