meteor-user-status
meteor-user-status copied to clipboard
Please add Userstatus.connections to database
I'm looking to track anonymous users along with various other information associated with them ( their geolocated city for instance ), then publish it to the client.
Can you remove connection: null
from https://github.com/mizzao/meteor-user-status/blob/1044fed0a50c7a6e3dd022e1e9a6cbd09d2f08c9/status.coffee#L8
to make this possible?
Also how would a client retrieve their UserStatus.connections
_id?
Thanks
You can still publish it to the client. See the demo.
The client's id is just Meteor.connection._lastSessionId
on the client side.
That works great, however I would like to have the client modify it's own user status record, which the server would publish out to other apps, like a microservice. Is there a straightforward way of doing this without adding it to the database?
Yeah, you just modify it (e.g. with a server method) like any other collection...it doesn't need to be in the database.
You can also fork the package and make your own version that puts it in the database, although I don't think I'd put that in the canonical package.
I got Error: Can't call yield in a noYieldsAllowed block!
after replacing the canonical version with a local copy, have you ran into this error along the way?