For example, in /room/:roomId
route, users need Meteor.subscribe('room', roomId)
. There are 5 users are currently subscribing it. How can I retrieve the 5 users userIds on server side?
Actually I could find what I need in Meteor.default_server.sessions
, however it’s not reactive. I had to fetch the data every 5 seconds. What I’m looking for is a hook function like onSubscriptionStart
.
Anyone has any good ideas about retrieving online users’ ids who are in a particular subscription?