HomePhabricator
Diffusion Comm 20268f039fdd

[keyserver] Send web push notification

Description

[keyserver] Send web push notification

Summary:
This diff actually sends a web push notification using the web-push library. The library is initialized during configuration loading (added in one of the previous diffs). Then we can just send a notification with the device_token (which contains e.g. an endpoint and keys but it's all handled by web-push). Otherwise the logic should be similar to iOS and Android notifications.

Depends on D6815, D6813, D6717

Test Plan:
Tested with next diff initializes notif sending on the web app side:

  • test that notifs are send with correct values
  • check that the results are saved inside of the notifications table
  • check that errors are saved inside of the notifications table
  • check that device_token is removed after unsuccessful push notif

Reviewers: tomek, atul, kamil, marcin, ashoat

Reviewed By: ashoat

Subscribers: ashoat

Differential Revision: https://phab.comm.dev/D6817

Details

Provenance
Michal Gniadek <michal.gniadek@swmansion.com>Authored on Feb 20 2023, 7:18 AM
Reviewer
ashoat
Differential Revision
D6817: [keyserver] Send web push notification
Parents
rCOMM5066f77dc21a: [keyserver/ web] Handle device_token on web
Branches
Unknown
Tags
Unknown

Event Timeline

Michal Gniadek <michal.gniadek@swmansion.com> committed rCOMM20268f039fdd: [keyserver] Send web push notification (authored by Michal Gniadek <michal.gniadek@swmansion.com>).Mar 1 2023, 12:49 AM