HomePhabricator
Diffusion Comm 71fee1b8ed13

Send visual notifications in the same order as they were encrypted

Description

Send visual notifications in the same order as they were encrypted

Summary:
This differential ensure that visual (the ones making an alert) notifications are sent in the same order as they were encrypted with respect to the same
device withing single sendPushNotifs promise resolution. This is achieved by separating notification preparation and notification delivery steps. First
notifications are prepared (constructed and encrypted). This
step is entirely asynchronous. Then encrypted notifications are groupped by device token. In the same group notifications are sent sequentially in order mthcing
encryption order. Different groups are awaited asynchronously.

Test Plan:

  1. Test that notifications functionality remains unchanged - I sent messages and rescinds between four devices: two webs and two natives (Android and iOS).
  2. Test that notifications are indeed sent in encryption order for single device - I added console.log to each <platform>Push function to examine whether notifications are sent in the right order based on encryptionOrder field of Targeted<platform>Notification instance.

Reviewers: kamil, michal, ashoat

Reviewed By: ashoat

Subscribers: tomek, wyilio

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

Details

Provenance
marcinAuthored on Nov 10 2023, 5:37 AM
Reviewer
ashoat
Differential Revision
D9819: Send visual notifications in the same order as they were encrypted
Parents
rCOMM694db6d6559a: Refactor Windows push code to match conventions for other platforms
Branches
Unknown
Tags
Unknown