mirror of
https://github.com/wekan/wekan.git
synced 2025-09-22 01:50:48 +02:00
Move every CardComments.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory server/)
This commit is contained in:
parent
7caf817c81
commit
d6ca13a61d
2 changed files with 11 additions and 7 deletions
|
@ -794,7 +794,7 @@ function findCards(sessionId, query) {
|
||||||
ReactiveCache.getChecklists({ cardId: { $in: cards.map(c => c._id) } }, {}, true),
|
ReactiveCache.getChecklists({ cardId: { $in: cards.map(c => c._id) } }, {}, true),
|
||||||
ReactiveCache.getChecklistItems({ cardId: { $in: cards.map(c => c._id) } }, {}, true),
|
ReactiveCache.getChecklistItems({ cardId: { $in: cards.map(c => c._id) } }, {}, true),
|
||||||
Attachments.find({ 'meta.cardId': { $in: cards.map(c => c._id) } }).cursor,
|
Attachments.find({ 'meta.cardId': { $in: cards.map(c => c._id) } }).cursor,
|
||||||
CardComments.find({ cardId: { $in: cards.map(c => c._id) } }),
|
ReactiveCache.getCardComments({ cardId: { $in: cards.map(c => c._id) } }, {}, true),
|
||||||
SessionData.find({ userId, sessionId }),
|
SessionData.find({ userId, sessionId }),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,13 +70,17 @@ Meteor.publish('notificationChecklists', function() {
|
||||||
|
|
||||||
// gets all comments associated with activities associated with the current user
|
// gets all comments associated with activities associated with the current user
|
||||||
Meteor.publish('notificationComments', function() {
|
Meteor.publish('notificationComments', function() {
|
||||||
const ret = CardComments.find({
|
const ret = ReactiveCache.getCardComments(
|
||||||
_id: {
|
{
|
||||||
$in: activities()
|
_id: {
|
||||||
.map(v => v.commentId)
|
$in: activities()
|
||||||
.filter(v => !!v),
|
.map(v => v.commentId)
|
||||||
|
.filter(v => !!v),
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
{},
|
||||||
|
true,
|
||||||
|
);
|
||||||
return ret;
|
return ret;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue