Show attachment name in Outgoing Webhook when attachment is removed from card.

Thanks to xet7 !

Related #2285
This commit is contained in:
Lauri Ojansivu 2019-06-11 13:11:35 +03:00
parent 992ecfefa2
commit 23ccb3b991

View file

@ -88,18 +88,22 @@ if (Meteor.isServer) {
}
});
Attachments.files.after.remove((userId, doc) => {
Activities.remove({
attachmentId: doc._id,
});
Attachments.files.before.remove((userId, doc) => {
Activities.insert({
userId,
type: 'card',
activityType: 'deleteAttachment',
attachmentId: doc._id,
boardId: doc.boardId,
cardId: doc.cardId,
listId: doc.listId,
swimlaneId: doc.swimlaneId,
});
});
Attachments.files.after.remove((userId, doc) => {
Activities.remove({
attachmentId: doc._id,
});
});
}