Page MenuHomePhabricator

Implement building encrypted notifications on the client
ClosedPublic

Authored by marcin on Jun 19 2024, 1:23 PM.
Tags
None
Referenced Files
F3270600: D12477.id41948.diff
Sat, Nov 16, 4:37 AM
F3262541: D12477.id42034.diff
Fri, Nov 15, 11:44 PM
F3249535: D12477.id41496.diff
Fri, Nov 15, 3:50 PM
Unknown Object (File)
Fri, Nov 15, 2:36 AM
Unknown Object (File)
Thu, Nov 14, 11:29 PM
Unknown Object (File)
Thu, Nov 14, 11:25 PM
Unknown Object (File)
Wed, Nov 13, 3:41 AM
Unknown Object (File)
Fri, Nov 1, 6:42 PM
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