The problem is the next code on server:
Meteor.publish(null , function() {
let events = [];
Groups.find({participants: this.userId}).forEach(function(item) {
events.push(item.latestEvent);
});
return Events.find({_id: {$in: events}});
});
doesn't provide possibility to see new documents on the client > Events.find().fetch()
without reloading the page.
Both collection are in the lib
folder:
Groups = new Mongo.Collection('groups');
Events = new Mongo.Collection('events');
I'm pretty sure the issue is in reactive source of data, but still cannot fix it.
Thank You for help!