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

Webpush API for offline notifications? #344

Open
pwFoo opened this issue Jul 30, 2020 · 8 comments
Open

Webpush API for offline notifications? #344

pwFoo opened this issue Jul 30, 2020 · 8 comments
Labels
a:feature New feature or request

Comments

@pwFoo
Copy link

pwFoo commented Jul 30, 2020

Hi,
I'm searching for a (self hosted) webpush server, which can send offline notifications to browsers via existing vendor push server with a simple rest api.

Looks like gotify works only with websocket, but misses a offline notification to Chrome (for Android), Firefox, Edge.

There is a go lib maybe could Help to integrate webpush with service-worker client side?

@pwFoo pwFoo added the a:feature New feature or request label Jul 30, 2020
@jmattheis
Copy link
Member

The gotify android app should send messages that were received while the device was offline. I don't know yet if I want to support web push in gotify, I'll have to do some research on that topic.

@joe-getcouragenow
Copy link

I have seen a few apps that are starting to use Web Push notifications. Until recently it was not being used much at all.

@pwFoo
Copy link
Author

pwFoo commented Mar 22, 2021

Back after some time, because could be interesting to have a self hosted push service for desktop browser and mobiles...

Webpush api uses the vender push server (Firefox -> Mozilla, Chrome -> Google, ...) and could be a nice feature to use without the need of a client side app? I know you try to avoid third party services, but optional it would be "ok" for users anyway use vender browsers?

Gotify need to

  1. push notifications als with closed browser / app
  2. deliver notifications delayed if the client is offline during the notification is send / triggered

@klodeckl
Copy link

klodeckl commented Jan 17, 2022

Any news on web push?
I would like push notifications integrated for a website with browser notifications. Is this possible?

@Minglarn
Copy link

I've have made some tests with Gotify. It's working, but I dont know if this is a bug or limitiations on who Websockets work but...
Gotify is not able to send images in the notification, the image is viewable when you open the notification but it does not show up when viewing it as a notification.

@MexHigh
Copy link
Contributor

MexHigh commented May 2, 2022

It might be possible to use push notifications without the Webpush API by self-implementing such a mechanism. You could still use service workers to display notification, while the UI is closed. Instead of pushing messages to the service worker via a vendor push server, Gotify itself can push them to the service worker.

This way no third party servers are required. We just need to implement a listener for new messages in a service worker.

I may take a look into this.

@tschuxxi
Copy link

tschuxxi commented Jun 3, 2023

Wouldn't this also solve the issue with iOS? If you create a shortcut on your home screen you could then receive push notifications on iPhones and iPads, if I'm not mistaken

@tomaluca95
Copy link

I was going to open a new issue about VAPID support and i found this one. I think the service worker route is quite more complex and is not the most efficient because you have to establish and keep a new connection from the device to the server and you have to manage the entire codebase.
Some time ago I used this library github.com/SherClockHolmes/webpush-go to send VAPID notificatoins from a go backend to a react webapp.

VAPID specs doesn't require any API key for the vendor server and, as far as i know, the message on their server is keept encrypted. Anywais the message can be only a "wake up call" for the web ui to start the usual websocket.

I don't know if vapid was evaluated before and excluded for some reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:feature New feature or request
Development

Successfully merging a pull request may close this issue.

8 participants