MatthieuLemoine / push-receiver

A library to subscribe to GCM/FCM and receive notifications within a node process.
https://medium.com/@MatthieuLemoine/my-journey-to-bring-web-push-support-to-node-and-electron-ce70eea1c0b0
MIT License
202 stars 80 forks source link

onNotification doesnt get called #14

Closed denigada closed 6 years ago

denigada commented 6 years ago

Hello, I am using this in my nw.js desktop app. Thank you a lot for this library it saved my life.

My onNotification function does not get called when I send a notification. I could not figure out how to solve this issue. Can you please help me ? Here is my code:

unknown

I call initNotifications if there is no credentials stored and retrieveNotifications if there are. Thank you so much in advance.

MatthieuLemoine commented 6 years ago

@denigada Your code seems fine. Can you clone the project and try the example in example/index.js ?