summaryrefslogtreecommitdiffstats
path: root/models/wekanCreator.js
diff options
context:
space:
mode:
Diffstat (limited to 'models/wekanCreator.js')
-rw-r--r--models/wekanCreator.js30
1 files changed, 12 insertions, 18 deletions
diff --git a/models/wekanCreator.js b/models/wekanCreator.js
index 7e320817..9c7f50ec 100644
--- a/models/wekanCreator.js
+++ b/models/wekanCreator.js
@@ -550,24 +550,18 @@ export class WekanCreator {
break;
}
// Attachment related activities
- // TODO: We can't add activities related to adding attachments
- // because when we import an attachment, an activity is
- // autmatically created. We need to directly insert the attachment
- // without calling the "Attachments.files.after.insert" hook first,
- // then we can uncomment the code below
- // case 'addAttachment': {
- // console.log(this.attachmentIds);
- // Activities.direct.insert({
- // userId: this._user(activity.userId),
- // type: 'card',
- // activityType: activity.activityType,
- // attachmentId: this.attachmentIds[activity.attachmentId],
- // cardId: this.cards[activity.cardId],
- // boardId,
- // createdAt: this._now(activity.createdAt),
- // });
- // break;
- // }
+ case 'addAttachment': {
+ Activities.direct.insert({
+ userId: this._user(activity.userId),
+ type: 'card',
+ activityType: activity.activityType,
+ attachmentId: this.attachmentIds[activity.attachmentId],
+ cardId: this.cards[activity.cardId],
+ boardId,
+ createdAt: this._now(activity.createdAt),
+ });
+ break;
+ }
// Checklist related activities
case 'addChecklist': {
Activities.direct.insert({