Page MenuHomePhabricator

[lib] move processing `MESSAGE_TO_DEVICE` to a component
ClosedPublic

Authored by kamil on Jun 10 2024, 4:10 AM.
Tags
None
Referenced Files
F3361829: D12371.diff
Sun, Nov 24, 7:37 PM
Unknown Object (File)
Wed, Nov 20, 2:40 PM
Unknown Object (File)
Wed, Nov 20, 2:40 PM
Unknown Object (File)
Fri, Nov 8, 7:14 PM
Unknown Object (File)
Fri, Nov 8, 1:52 PM
Unknown Object (File)
Fri, Nov 1, 11:47 PM
Unknown Object (File)
Oct 22 2024, 1:15 PM
Unknown Object (File)
Oct 22 2024, 9:05 AM
Subscribers

Details

Summary
  1. Cleans messy TunnelbrokerContext
  2. Makes it possible to convert peerToPeerMessageHandler to a hook and avoids passing a lot of callbacks as arguments
  3. Makes it possible to call sendMessage from peerToPeerMessageHandler (needed to implement ENG-7837).
Test Plan

Flow - this is just moving code to a child component. Functionality tested later in the stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil added inline comments.
lib/tunnelbroker/tunnelbroker-context.js
395–404 ↗(On Diff #41151)

not sure about best practices but this feels the best for this particular use case (passing ref as prop and reading it from promise later)

kamil published this revision for review.Jun 10 2024, 9:50 AM
lib/tunnelbroker/tunnelbroker-context.js
422 ↗(On Diff #41151)

Unusual pattern to use "if" in a boolean variable name

How about doesSocketExist?

This revision is now accepted and ready to land.Jun 12 2024, 4:25 AM

ifSocketExists -> doesSocketExist