Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please add Userstatus.connections to database #99

Open
jdmswong opened this issue May 16, 2016 · 4 comments
Open

Please add Userstatus.connections to database #99

jdmswong opened this issue May 16, 2016 · 4 comments
Labels

Comments

@jdmswong
Copy link

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

@mizzao
Copy link
Collaborator

mizzao commented May 16, 2016

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

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

@jdmswong
Copy link
Author

jdmswong commented May 16, 2016

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?

@mizzao
Copy link
Collaborator

mizzao commented May 16, 2016

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.

@jdmswong
Copy link
Author

jdmswong commented May 17, 2016

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants