summaryrefslogtreecommitdiffstats
path: root/models/attachments.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/attachments.js')
-rw-r--r--models/attachments.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/models/attachments.js b/models/attachments.js
index 798d04be..cab3d9e3 100644
--- a/models/attachments.js
+++ b/models/attachments.js
@@ -41,6 +41,9 @@ function onAttachmentUploaded(fileRef) {
type: 'card',
activityType: 'addAttachment',
attachmentId: fileRef._id,
+ // this preserves the name so that notifications can be meaningful after
+ // this file is removed
+ attachmentName: fileRef.versions.original.name,
boardId: fileRef.meta.boardId,
cardId: fileRef.meta.cardId,
listId: fileRef.meta.listId,
@@ -70,6 +73,9 @@ function onAttachmentRemoving(cursor) {
type: 'card',
activityType: 'deleteAttachment',
attachmentId: file._id,
+ // this preserves the name so that notifications can be meaningful after
+ // this file is removed
+ attachmentName: file.versions.original.name,
boardId: meta.boardId,
cardId: meta.cardId,
listId: meta.listId,