Simple everyone.count or somegroup.count to get the number of users at the time dont exist anymore?
I need to limit the number of users in a room. Which path should I follow?
somegroup.count should still exist? What is the issue you are experiencing?
Note that .count is now an asynchronous function
@ericz, you write here #49 (comment)
I would like to access the value in a synchronous manner. Any way, I could do what he wanted, with more work, but it was done. Thanks!
You can technically access it in a synchronous manner; it just won't be compatible with the cluster version, since there's really no way to access a group's count synchronously without blocking when users are potentially spread across multiple servers. Try Object.keys(group.users).length. Not advised.
@andrecaribe steveWang's method will work if you need synchronous access but is not documented.