// Notifications - only load if user is logged in // Not mandatory, because server won't publish anything even if we try to load. // Remember about Deps.autorun - user can log in and log out several times Tracker.autorun(function() { // userId() can be changed before user(), because loading profile takes time if(Meteor.userId()) { Meteor.subscribe('notifications'); } });