User Signs-in on this device. The user in Meteor has opted in the past to receive Push notifications from this app.
He is supposed to receive Push on whichever devices is enabled by the user to provide these Push Notifications.
I try to get a token. If I get one (browser gives it to me) I save this userId in Mongo associated with this token. If there was already a user on the token I overwrite the old user.
If the browser blocks me, tell the user he is set to receive Push notifications but the browser blocks that.
If the user is not set to receive Push just disregard everything. (do not call a getToken)
When the user logs out the app from a browser, unsubscribe the user from notifications in that browser.
e.g. I want to subscribe to Notifications. My browser blocks notification. activitree:push can sense this and return this message to UI.
Logic: Press "Subscribe" -> receive message: Please allow your browser to receive notifications.