Skip to content

Process to allow transforming push notification before it is displayed #60609

Closed as not planned

Description

@ettubrute47

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

  1. added this to the needsTriage milestone on Mar 28, 2025
  2. JeanMeche commented on Aug 29, 2025

    @JeanMeche
    Member

    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

  3. angular-automatic-lock-bot commented on Sep 29, 2025

    @angular-automatic-lock-bot

    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.

  4. locked and limited conversation to collaborators on Sep 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: service-workerIssues related to the @angular/service-worker package

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions