diff --git a/models/activities.js b/models/activities.js index 4ddcfa72c..be290dce4 100644 --- a/models/activities.js +++ b/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(); diff --git a/models/cardComments.js b/models/cardComments.js index 352030f1e..cc1c55bce 100644 --- a/models/cardComments.js +++ b/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) { diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js index 07a0a9037..ed3d8df70 100644 --- a/server/notifications/outgoing.js +++ b/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;