You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Process to allow transforming push notification before it is displayed #60609
Which @angular/* package(s) are relevant/related to the feature request?
service-worker
Description
I appreciate the hooks for displaying push notifications already, but if I want to modify the content of the notification before showing it, I don't think I have a way to do that without changing the worker.
My use case is in a web app testing the extent of E2EE - threat model assumes read-access to server db, client schedules a push notification, contents encrypted to the server, which schedules it when time comes. On receipt, client needs to be able to decrypt the content before passing to normal 'showNotification' flow.
Proposed solution
The simplest solution in my mind would be a callback that allows you to modify the notification payload before continuing to show it. Part of SwPush, though itd have to run when application is closed so Im not sure that would work. An even better solution would be to officially support extending the service worker module, as there are other issues with specific service worker niche use cases that could be solved by just supporting service worker extensions.
Alternatives considered
Manually updating service worker or adding custom service worker with importScripts. Fragile.
Activity
JeanMeche commentedon Aug 29, 2025
With #63364 we've announced that the service-worker package in now in maintenance mode and will not receive feature PRs and feature requests.
The message is also visible here: https://angular.dev/ecosystem/service-workers
angular-automatic-lock-bot commentedon Sep 29, 2025
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.