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.
Details
Details
- Test that notifications functionality remains unchanged - I sent messages and rescinds between four devices: two webs and two natives (Android and iOS).
- 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.
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
Comment Actions
Fix bug: Add encryptionOrder field from the value returned from prepareEncrypted<IOS/Android>Notifications to the value returned from
prepare<APNs/Android>Notification.
keyserver/src/push/send.js | ||
---|---|---|
459–473 ↗ | (On Diff #33070) | Can these two maps be combined into one? |
502–505 ↗ | (On Diff #33070) | I think this is supposed to be two function invocations in lodash/fp, no? |
507–516 ↗ | (On Diff #33070) | Does this function need to be redefined every time deliverPushNotifsInEncryptionOrder is invoked? |
529 ↗ | (On Diff #33070) | Please pull await to the top level, you are hiding it here. await should either be the first word in the statement, or the first part of the right side of an assignment |
554 ↗ | (On Diff #33070) | Please pull the flat to its own line |