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

Feature Request: Push API Support for Browser-Based Notifications #760

Open
PiecePaperCode opened this issue Jan 21, 2025 · 2 comments
Open
Labels
a:feature New feature or request in:server

Comments

@PiecePaperCode
Copy link

Is your feature request related to a problem? Please describe.
No, not directly. I would like to use the web client UI without needing to keep it open and maintain an active WebSocket connection. By using the Push API, my device can be registered directly to receive push notifications in my browser without installing the Android client. This would also enable registering Apple devices for push notifications via a web browser.

Describe the solution you'd like
Add support for the Push API via PushManager.subscribe on the server-side UI.

Describe alternatives you've considered
An Apple app could achieve similar functionality, but using browser-based push notifications would allow clients to receive messages without maintaining an active WebSocket connection.

Additional context
N/A

Implementation
I would like to contribute by implementing this feature in the server code.

@PiecePaperCode PiecePaperCode added the a:feature New feature or request label Jan 21, 2025
@eternal-flame-AD
Copy link
Member

Is this a duplicate of #344?

I am okay with this being an optional delivery route.

@eternal-flame-AD
Copy link
Member

I support this feature with some thoughts about VAPID, WP and it's integration:

  • The encryption looks okay for the data-free (notify-only) version but I don't like the E2E version as there is no guarantee we did not lose notifications due to key exhaustion (one of the pain point when I was discussing E2E for gotify too), and it is even worse with WP as if two push notification happened immediately one after another even if your device is online the second message will be un-sendable until a new key is available (I am not sure, you may be able to reuse a key but it breaks forward secrecy).

  • The logic has to be worked out carefully with validity/limits (should it be still keep notifying clients that has not made a authenticated request after X days? & maybe keep only up to 5 keys per user).

  • I am not really familiar with the development of PWA and other technologies, but as a user I really dislike service workers that linger in my browser when I didn't ask for it, especially if it can be triggered by a push request without the tab open. My personal preference is I would prefer to enroll in WP on a per-client basis (especially on desktop browsers where "allow notifications" imply registering for a lingering, I don't believe that is a desired behavior for gotify).

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 in:server
Development

No branches or pull requests

2 participants