mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
9 lines
384 B
JavaScript
9 lines
384 B
JavaScript
// 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');
|
|
}
|
|
});
|