meteor-user-status icon indicating copy to clipboard operation
meteor-user-status copied to clipboard

Please add Userstatus.connections to database

Open jdmswong opened this issue 8 years ago • 4 comments

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

jdmswong avatar May 16 '16 22:05 jdmswong

You can still publish it to the client. See the demo.

The client's id is just Meteor.connection._lastSessionId on the client side.

mizzao avatar May 16 '16 22:05 mizzao

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?

jdmswong avatar May 16 '16 23:05 jdmswong

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.

mizzao avatar May 16 '16 23:05 mizzao

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?

jdmswong avatar May 17 '16 00:05 jdmswong