I have a list of documents in the meteor, access to which is allowed only to authorized users. This is similar to Google docs. Is there an easy way to get a list of users who are currently viewing them?
I was thinking of including the currentUsers field in my mongodb object and deleting / deleting users whenever users are viewing or stop viewing the component. This seems like a strange way to do this, as the data is stored and probably error prone, as it does not exactly represent the users who are currently viewing the component at a time
https://stackoverflow.com/a/4646262/how-to-start-string-in-javascript/2326235#6113327 https://stackoverflow.com/questions/1015287/ ... is what I'm looking for, but the answer is a bit old, and I'm not sure how to use sockjs or. If someone can provide a working example that will be great.
Any help is much appreciated!
source share