Closed kimyu92 closed 5 years ago
@kimyu92 Do you get an error when sending?
@zaru There was no error when sending/receiving the message.
I have tweaked the rest of the code, to clarify things up, the latest webpush is actually working fine with JWT 2.
In order for notification to show up on chrome, I have to avoid passing tag
to the notification options.
I suspect chrome doesn't like the fact of using same tag?
self.addEventListener('push', function(event) {
// ... within push callback
event.waitUntil(
self.registration.showNotification(title, {
body: body,
icon: icon,
// tag: tag
})
);
Also, according to Can I use site, Microsoft Edge seems to support push api since v17. Does the gem support Microsoft Edge as well? 👈 It works!
I have created a simple web push demo. So far, I can send notification to firefox without problem.
However, I can only do it once for chrome for some unknown reasons.
The way I have setup:
api_key
to webpush from backendgcm_sender_id
tomanifest.json
Here is the dashboard from google console, in case it helps
Also, there was an issue mentioned about the gem would not work with
jwt
above v2? It would be great if anyone can clarify about this.