Page MenuHomePhabricator

Implement building encrypted notifications on the client
ClosedPublic

Authored by marcin on Jun 19 2024, 1:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Dec 25, 7:04 PM
Unknown Object (File)
Sun, Dec 22, 5:48 PM
Unknown Object (File)
Thu, Dec 19, 6:48 AM
Unknown Object (File)
Thu, Dec 19, 6:48 AM
Unknown Object (File)
Thu, Dec 19, 6:48 AM
Unknown Object (File)
Thu, Dec 19, 6:48 AM
Unknown Object (File)
Thu, Dec 19, 6:48 AM
Unknown Object (File)
Thu, Dec 19, 6:48 AM
Subscribers

Details

Summary

This differential implements full notifications structure generation on the client.

Test Plan
  1. Apply this patch
  2. Send message from native device
  3. Examin the console output.

Shortly I will make this test plan more extensive to test all notif types.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil added inline comments.
lib/push/send-utils.js
257–268 ↗(On Diff #41569)

can you move this to object?

530–543 ↗(On Diff #41569)

this should work too

547–551 ↗(On Diff #41569)

I would move await to a single line above, and here just filter to avoid (async () => {})() which here makes it less readable

This revision is now accepted and ready to land.Jul 1 2024, 2:48 AM
lib/push/send-utils.js
547–551 ↗(On Diff #41569)

In general, we have a rule in codebase that await should always be either the first keyword in a statement, or the first keyword on the right hand side of an assignment

lib/push/send-utils.js
547–551 ↗(On Diff #41569)

I would move await to a single line above, and here just filter to avoid (async () => {})() which here makes it less readable

This can't be done since we would sequentially await in a loop.

In general, we have a rule in codebase that await should always be either the first keyword in a statement, or the first keyword on the right hand side of an assignment

This can be done by first assigning promise result to a variable and then filtering, but still keeping operations inside (async () => {})()

  1. Extract parameters to object.
  2. Make sure await is the first keyword