Explorar el Código

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

Sam X. Chen hace 5 años
padre
commit
510407467c
Se han modificado 1 ficheros con 9 adiciones y 5 borrados
  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,
+          });
+        }
       }
     }
   },