瀏覽代碼

Merge branch 'andresmanelli-devel' into devel

Lauri Ojansivu 7 年之前
父節點
當前提交
08bab70dbe
共有 4 個文件被更改,包括 14 次插入6 次删除
  1. 6 2
      CHANGELOG.md
  2. 1 0
      models/activities.js
  3. 3 3
      models/cardComments.js
  4. 4 1
      server/notifications/outgoing.js

+ 6 - 2
CHANGELOG.md

@@ -1,10 +1,14 @@
 # Upcoming Wekan release
 
-This release fixes the following bugs:
+This release adds the following new features:
+
+* [Webhook parameters and response order](https://github.com/wekan/wekan/pull/1263).
+
+and fixes the following bugs:
 
 * [Fix: Slider for Comments only does not work correctly with over 21 activities](https://github.com/wekan/wekan/pull/1247).
 
-Thanks to Github user nztqa for contributions.
+Thanks to Github users andresmanelli and nztqa for their contributions.
 
 # v0.45 2017-10-01 Wekan release
 

+ 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();

+ 3 - 3
models/cardComments.js

@@ -125,15 +125,15 @@ if (Meteor.isServer) {
       boardId: paramBoardId,
     });
 
-    const cardComment = CardComments.findOne({_id: id, cardId:paramCardId, boardId: paramBoardId });
-    commentCreation(req.body.authorId, cardComment);
-
     JsonRoutes.sendResult(res, {
       code: 200,
       data: {
         _id: id,
       },
     });
+
+    const cardComment = CardComments.findOne({_id: id, cardId:paramCardId, boardId: paramBoardId });
+    commentCreation(req.body.authorId, cardComment);
   });
 
   JsonRoutes.add('DELETE', '/api/boards/:boardId/cards/:cardId/comments/:commentId', function (req, res, next) {

+ 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;