# Publish only the users that are in the particular meetingId # On the client side we pass the meetingId parameter Meteor.publish 'users', (meetingId) -> Meteor.Users.find({meetingId: meetingId}) Meteor.publish 'chat', (meetingId) -> Meteor.Chat.find({meetingId: meetingId}) Meteor.publish 'shapes', (meetingId) -> Meteor.Shapes.find({meetingId: meetingId}) Meteor.publish 'slides', (meetingId) -> Meteor.Slides.find({meetingId: meetingId}) Meteor.publish 'meetings', (meetingId) -> Meteor.Meetings.find({meetingId: meetingId}) # Clear all data in subcriptions @clearCollections = -> Meteor.Users.remove({}) console.log "cleared Users Collection!" Meteor.Chat.remove({}) console.log "cleared Chat Collection!" Meteor.Meetings.remove({}) console.log "cleared Meetings Collection!" Meteor.Shapes.remove({}) console.log "cleared Shapes Collection!" Meteor.Slides.remove({}) console.log "cleared Slides Collection!"