bigbluebutton-Github/labs/meteor-client/server/publish.coffee

30 lines
996 B
CoffeeScript
Raw Normal View History

# Publish only the users that are in the particular meetingId
# On the client side we pass the meetingId parameter
Meteor.publish 'users', (meetingId) ->
2014-06-25 02:20:18 +08:00
Meteor.Users.find({meetingId: meetingId})
Meteor.publish 'chat', (meetingId) ->
Meteor.Chat.find({meetingId: meetingId})
Meteor.publish 'shapes', (meetingId) ->
Meteor.Shapes.find({meetingId: meetingId})
2014-07-08 04:58:50 +08:00
Meteor.publish 'slides', (meetingId) ->
Meteor.Slides.find({meetingId: meetingId})
Meteor.publish 'meetings', (meetingId) ->
Meteor.Meetings.find({meetingId: meetingId})
2014-07-28 23:00:07 +08:00
# 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!"