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

Notify only specific user #130

Closed
deividas717 opened this issue Feb 18, 2017 · 1 comment
Closed

Notify only specific user #130

deividas717 opened this issue Feb 18, 2017 · 1 comment
Labels

Comments

@deividas717
Copy link

First of all I want to thank the developers for this amazing project :) Here's my question Imagine I have 100 users. Each has its own unique id. Let one user reserves table at specific time (basically writes to database) now when database is updated all of my users is notified and onDataAdded method is called. Is it possible to call onDataAdded method to only client that has updated database?

@ocram ocram added the question label Feb 20, 2017
@ocram
Copy link
Contributor

ocram commented Feb 20, 2017

Thanks!

This is pretty much a general Meteor question, and not a question related to this library.

But anyway, the important idea is that your subscriptions and publications control which client gets to see certain pieces of information.

If you don't want everybody to receive the new information, you just push it to a publication that only the specific user will (and can) subscribe to, e.g. a publication of notifications that expects the user's ID as a parameter.

If you publish data to a place that all users subscribe to, on the other hand, you will send this update to all users, of course.

@ocram ocram closed this as completed Feb 20, 2017
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