diff options
author | Lauri Ojansivu <x@xet7.org> | 2019-06-11 10:53:50 +0300 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2019-06-11 10:53:50 +0300 |
commit | 992ecfefa2e46ee7321ec9b8bfc3400532e5645e (patch) | |
tree | c368fec883bde6adb94a384879b7f9ab04090707 | |
parent | 3f1ac6b5db9caab457c3809cdb4c68fdc764a13b (diff) | |
download | wekan-992ecfefa2e46ee7321ec9b8bfc3400532e5645e.tar.gz wekan-992ecfefa2e46ee7321ec9b8bfc3400532e5645e.tar.bz2 wekan-992ecfefa2e46ee7321ec9b8bfc3400532e5645e.zip |
Show attachment name in Outgoing Webhook when attachment is added to card.
Thanks to xet7 !
Related #2285
-rw-r--r-- | models/activities.js | 3 | ||||
-rw-r--r-- | server/notifications/outgoing.js | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/models/activities.js b/models/activities.js index 1e97895d..a4a48284 100644 --- a/models/activities.js +++ b/models/activities.js @@ -166,7 +166,8 @@ if (Meteor.isServer) { } if (activity.attachmentId) { const attachment = activity.attachment(); - params.attachment = attachment._id; + params.attachment = attachment.original.name; + params.attachmentId = attachment._id; } if (activity.checklistId) { const checklist = activity.checklist(); diff --git a/server/notifications/outgoing.js b/server/notifications/outgoing.js index 30744555..655fe824 100644 --- a/server/notifications/outgoing.js +++ b/server/notifications/outgoing.js @@ -18,7 +18,7 @@ Meteor.methods({ // label activity did not work yet, see wekan/models/activities.js const quoteParams = _.clone(params); - ['card', 'list', 'oldList', 'board', 'oldBoard', 'comment', 'checklist', 'swimlane', 'oldSwimlane', 'label'].forEach((key) => { + ['card', 'list', 'oldList', 'board', 'oldBoard', 'comment', 'checklist', 'swimlane', 'oldSwimlane', 'label', 'attachment'].forEach((key) => { if (quoteParams[key]) quoteParams[key] = `"${params[key]}"`; }); |