mirror of
https://github.com/wekan/wekan.git
synced 2025-12-17 16:00:13 +01:00
Added restore list and change list title to webhooks
This commit is contained in:
parent
bfa15d4719
commit
1dd97ebd49
1 changed files with 14 additions and 3 deletions
|
|
@ -453,8 +453,19 @@ if (Meteor.isServer) {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
Lists.after.update((userId, doc) => {
|
Lists.after.update((userId, doc, fieldNames) => {
|
||||||
if (doc.archived) {
|
if (fieldNames.includes('title')) {
|
||||||
|
Activities.insert({
|
||||||
|
userId,
|
||||||
|
type: 'list',
|
||||||
|
activityType: 'changedListTitle',
|
||||||
|
listId: doc._id,
|
||||||
|
boardId: doc.boardId,
|
||||||
|
// this preserves the name so that the activity can be useful after the
|
||||||
|
// list is deleted
|
||||||
|
title: doc.title,
|
||||||
|
});
|
||||||
|
} else if (doc.archived) {
|
||||||
Activities.insert({
|
Activities.insert({
|
||||||
userId,
|
userId,
|
||||||
type: 'list',
|
type: 'list',
|
||||||
|
|
@ -465,7 +476,7 @@ if (Meteor.isServer) {
|
||||||
// list is deleted
|
// list is deleted
|
||||||
title: doc.title,
|
title: doc.title,
|
||||||
});
|
});
|
||||||
} else {
|
} else if (fieldNames.includes('archived')) {
|
||||||
Activities.insert({
|
Activities.insert({
|
||||||
userId,
|
userId,
|
||||||
type: 'list',
|
type: 'list',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue