mirror of
https://github.com/wekan/wekan.git
synced 2026-02-03 07:01:47 +01:00
New change settings option and possibility to hide system messagaes
This commit is contained in:
parent
94cdcff79f
commit
8290dcb249
6 changed files with 61 additions and 13 deletions
|
|
@ -3,17 +3,17 @@
|
|||
// 2. The card activity tab
|
||||
// We use this publication to paginate for these two publications.
|
||||
|
||||
Meteor.publish('activities', (kind, id, limit) => {
|
||||
Meteor.publish('activities', (kind, id, limit, hideSystem) => {
|
||||
check(kind, Match.Where((x) => {
|
||||
return ['board', 'card'].indexOf(x) !== -1;
|
||||
}));
|
||||
check(id, String);
|
||||
check(limit, Number);
|
||||
check(hideSystem, Boolean);
|
||||
|
||||
return Activities.find({
|
||||
[`${kind}Id`]: id,
|
||||
}, {
|
||||
limit,
|
||||
sort: {createdAt: -1},
|
||||
});
|
||||
});
|
||||
let selector = (hideSystem) ? {$and: [{activityType: 'addComment'}, {[`${kind}Id`]: id}]} : {[`${kind}Id`]: id};
|
||||
return Activities.find(selector, {
|
||||
limit,
|
||||
sort: {createdAt: -1},
|
||||
});
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue