diff options
author | Romulus Tsai 蔡仲明 <urakagi@gmail.com> | 2020-05-08 10:13:11 +0800 |
---|---|---|
committer | Romulus Tsai 蔡仲明 <urakagi@gmail.com> | 2020-05-08 10:13:11 +0800 |
commit | c3458855bdb52c976ee6689ad5a0d4e92e96f2e3 (patch) | |
tree | d9dbbcc3087b5bfc520710b5f5624a3f4e2b78e6 /models/attachments.js | |
parent | 444848876759173ad80203129250d2f0311f30fc (diff) | |
parent | cfcc73724fcd394150d1b815d0a7a4c466e216b5 (diff) | |
download | wekan-c3458855bdb52c976ee6689ad5a0d4e92e96f2e3.tar.gz wekan-c3458855bdb52c976ee6689ad5a0d4e92e96f2e3.tar.bz2 wekan-c3458855bdb52c976ee6689ad5a0d4e92e96f2e3.zip |
Merge branch 'master' into lib-change
Diffstat (limited to 'models/attachments.js')
-rw-r--r-- | models/attachments.js | 6 |
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, |