Hello All,
I’m building an application that needs to send messages to logged-in users who are connected. I have a meteor cron job running that checks what messages to send to who every minute. To send them, I tried to use this package https://github.com/raix/Meteor-EventDDP, which looks like it would do the job perfectly. However, I’m having trouble because I need to specify the userId of each particular user and send it to them only if they are logged in. I think this package doesn’t support sending messages based on userId (i think it filters messages on the client)
It seems like I could do this with a pub/sub function, and another collection, however, it doesn’t make sense to me to have a whole new mongodb collection just for sending events. I’d also have to delete these events as well.
is there any way to make a publish function that will automatically publish specific messages to individual clients without having to make another collection that gets periodically deleted?