diff --git a/labs/meteor-client/client/globals.coffee b/labs/meteor-client/client/globals.coffee index fdf47054f2..de8f17fe74 100755 --- a/labs/meteor-client/client/globals.coffee +++ b/labs/meteor-client/client/globals.coffee @@ -34,6 +34,8 @@ Handlebars.registerHelper "getCurrentUser", => Meteor.methods sendMeetingInfoToClient: (meetingId, userId) -> + Session.set("userId", userId) + Session.set("meetingId", meetingId) console.log "---------------------------------on client, meetingId + userId" console.log meetingId console.log userId diff --git a/labs/meteor-client/client/main.coffee b/labs/meteor-client/client/main.coffee index fe3c90abe4..62f106c498 100755 --- a/labs/meteor-client/client/main.coffee +++ b/labs/meteor-client/client/main.coffee @@ -5,7 +5,7 @@ Meteor.startup -> Session.set "display_chatbar", false # false until respective template is created Session.set "display_whiteboard", false # false until respective template is created - Meteor.subscribe 'users', 'fd9f3cd6ee945175f276098945d37cd4f46f7b4f-1403121629339' + Meteor.subscribe 'users', Session.get('meetingId') Template.header.events "click .usersListIcon": (event) -> diff --git a/labs/meteor-client/server/publish.coffee b/labs/meteor-client/server/publish.coffee index 66301d44f5..f7773191ab 100755 --- a/labs/meteor-client/server/publish.coffee +++ b/labs/meteor-client/server/publish.coffee @@ -1,5 +1,4 @@ - +# Publish only the users that are in the particular meetingId +# On the client side we pass the meetingId parameter Meteor.publish 'users', (meetingId) -> - console.log "\n\nKK" + meetingId + "KK\n\n" - Meteor.users.find({meetingId: meetingId}) \ No newline at end of file diff --git a/labs/meteor-client/server/server.js b/labs/meteor-client/server/server.js index a4b80d866f..ed18012490 100755 --- a/labs/meteor-client/server/server.js +++ b/labs/meteor-client/server/server.js @@ -1,7 +1,7 @@ //////////////////////////////////////////////////////////////////// // Startup // - +/* Meteor.startup(function () { console.log('server start'); // cleanup collections @@ -23,3 +23,4 @@ Meteor.startup(function () { SetCollectionPermissions(); }); +*/