mirror of
https://github.com/wekan/wekan.git
synced 2025-04-23 13:37:09 -04: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.getChecklistItems({ cardId: { $in: cards.map(c => c._id) } }, {}, true),
|
||||
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 }),
|
||||
];
|
||||
}
|
||||
|
|
|
@ -70,13 +70,17 @@ Meteor.publish('notificationChecklists', function() {
|
|||
|
||||
// gets all comments associated with activities associated with the current user
|
||||
Meteor.publish('notificationComments', function() {
|
||||
const ret = CardComments.find({
|
||||
_id: {
|
||||
$in: activities()
|
||||
.map(v => v.commentId)
|
||||
.filter(v => !!v),
|
||||
const ret = ReactiveCache.getCardComments(
|
||||
{
|
||||
_id: {
|
||||
$in: activities()
|
||||
.map(v => v.commentId)
|
||||
.filter(v => !!v),
|
||||
},
|
||||
},
|
||||
});
|
||||
{},
|
||||
true,
|
||||
);
|
||||
return ret;
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue