notifications icon indicating copy to clipboard operation
notifications copied to clipboard

Front/webpush

Open p1gp1g opened this issue 1 month ago • 3 comments

This PR uses the new web push support (#2662) to get push notifications on the web application, even when nextcloud isn't opened in the browser.

It achieves 2 things:

  • it gives push notifications when nextcloud isn't opened: this is particularly useful for collaborative work, as nexcloud isn't always opened but we can expect to be notified anyway. (I won't miss call, polls, or events anymore)
  • it gives real time notifications, without the notify_push app (which adds a websocket support to nextcloud). It should reduce load on the server as the periodic fetch is reduce to once every 15min. When the server get a notification for a user, it sends it to the user through its push server (all modern browser are connected to a push server)

To work, this PR needs to add worker-src 'sefl' to the CSP by default:

https://github.com/nextcloud/server/blob/master/lib/public/AppFramework/Http/EmptyContentSecurityPolicy.php#L62

-	protected $allowedWorkerSrcDomains = null;
+	protected $allowedWorkerSrcDomains = "'self'";

p1gp1g avatar Nov 28 '25 08:11 p1gp1g