Page MenuHomePhabricator

[lib/native] introduce handling Tunnelbroker peer-to-peer messages
ClosedPublic

Authored by kamil on Dec 18 2023, 4:48 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Fri, Oct 18, 2:08 AM
Unknown Object (File)
Thu, Oct 10, 5:33 AM
Unknown Object (File)
Sep 6 2024, 7:37 PM
Subscribers

Details

Summary

This adds:

  1. Types od messages which is sent as payload of MessageToDevice between peers
  2. Validators
  3. Allow Tunnelbroker socket to call handler specific for platform

Depends on D10378

Test Plan

Tested in next diffs and end-to-end in [link to diff]

Diff Detail

Repository
rCOMM Comm
Branch
publish-olm-stack
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil published this revision for review.Dec 18 2023, 6:53 AM
lib/types/tunnelbroker/peer-to-peer-message-types.js
17–20

We can now consider using Flow enums for these, as we have all of the requirements. There are 3 steps to enable them, but you might not have the cycles for this right now. Just figured I'd flag

lib/types/tunnelbroker/peer-to-peer-message-types.js
17–20

Note for reviewers: this should not be numbers but strings, because later we need to add REFRESH_KEY_REQUEST: 'RefreshKeyRequest', which is sent by Identity, I'll update this shortly

michal added inline comments.
lib/tunnelbroker/tunnelbroker-context.js
52

This is more general and allows both sync and async functions

This revision is now accepted and ready to land.Jan 8 2024, 3:42 AM
kamil requested review of this revision.Jan 9 2024, 2:50 AM
kamil added 1 blocking reviewer(s): michal.
michal added inline comments.
lib/tunnelbroker/tunnelbroker-context.js
166 ↗(On Diff #35407)

Do we still need void here after changing the return type to mixed?

lib/types/tunnelbroker/peer-to-peer-message-types.js
54 ↗(On Diff #35407)
This revision is now accepted and ready to land.Jan 9 2024, 3:01 AM