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

Send to multiple users or subscribe to topics? #1

Closed
pwFoo opened this issue Jul 30, 2020 · 1 comment
Closed

Send to multiple users or subscribe to topics? #1

pwFoo opened this issue Jul 30, 2020 · 1 comment

Comments

@pwFoo
Copy link

pwFoo commented Jul 30, 2020

Is it possible to send notification to multiple users or subscribe different topics?

@pmagaz
Copy link
Owner

pmagaz commented Jul 31, 2020

Hi,

Actually server will send notification to every user subscribed. Users subscriptions are stored in NeDB embebed database. You can easyly create differente topics passing the topic to /register endpoint and saving the topic as additional field. Then, when you want to send notifications for an especific topic, you have to query for subscriptions matching that topic. Take a look to (db/index.js)

@pmagaz pmagaz closed this as completed Sep 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants