diff --git a/server/publications/cards.js b/server/publications/cards.js index b5934df75..c16af5f01 100644 --- a/server/publications/cards.js +++ b/server/publications/cards.js @@ -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 }), ]; } diff --git a/server/publications/notifications.js b/server/publications/notifications.js index 94337369d..ea729dafc 100644 --- a/server/publications/notifications.js +++ b/server/publications/notifications.js @@ -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; });