/** * @file * * * User: marand * Date: 30/08/15 * Time: 11:53 */ Meteor.publish('posts', function() { return Posts.find(); }); Meteor.publish('push_feed', function() { return PushFeed.find(); }); Meteor.publish('userData', function () { // If user is logged-in. if (this.userId) { return Meteor.users.find({ _id: this.userId }, { fields: { 'emails': 1 } }); } });