Przeglądaj źródła

Add some parameters to webhook

Andrés Manelli 7 lat temu
rodzic
commit
196f959f1d
2 zmienionych plików z 5 dodań i 1 usunięć
  1. 1 0
      models/activities.js
  2. 4 1
      server/notifications/outgoing.js

+ 1 - 0
models/activities.js

@@ -110,6 +110,7 @@ if (Meteor.isServer) {
     if (activity.commentId) {
       const comment = activity.comment();
       params.comment = comment.text;
+      params.commentId = comment._id;
     }
     if (activity.attachmentId) {
       const attachment = activity.attachment();

+ 4 - 1
server/notifications/outgoing.js

@@ -29,7 +29,10 @@ Meteor.methods({
       text: `${text}`,
     };
 
-    ['cardId', 'listId', 'oldListId', 'boardId'].forEach((key) => {
+    [   'cardId', 'listId', 'oldListId',
+        'boardId', 'comment', 'user',
+        'card', 'commentId'
+    ].forEach((key) => {
       if (params[key]) value[key] = params[key];
     });
     value.description = description;