Move every Users.find(idOrFirstObjectSelector, options) to the ReactiveCache (directory server/)

This commit is contained in:
Martin Filser 2023-03-12 11:59:23 +01:00
parent 46840c9373
commit 6646b8638e
5 changed files with 23 additions and 15 deletions

View file

@ -106,13 +106,17 @@ Meteor.publish('notificationSwimlanes', function() {
// gets all users associated with activities associated with the current user
Meteor.publish('notificationUsers', function() {
const ret = Users.find({
_id: {
$in: activities()
.map(v => v.userId)
.filter(v => !!v),
const ret = ReactiveCache.getUsers(
{
_id: {
$in: activities()
.map(v => v.userId)
.filter(v => !!v),
},
},
});
{},
true,
);
return ret;
});