Page MenuHomePhabricator

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

Authored by kamil on Mon, Jun 10, 4:10 AM.
Tags
None
Referenced Files
F2164662: D12371.id41284.diff
Tue, Jul 2, 12:10 AM
Unknown Object (File)
Wed, Jun 26, 8:49 AM
Unknown Object (File)
Tue, Jun 25, 2:35 PM
Unknown Object (File)
Mon, Jun 24, 9:48 PM
Unknown Object (File)
Sun, Jun 23, 11:41 PM
Unknown Object (File)
Sat, Jun 22, 5:24 AM
Unknown Object (File)
Fri, Jun 21, 5:51 AM
Unknown Object (File)
Fri, Jun 21, 5:51 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
Branch
peer-list-3
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

kamil held this revision as a draft.
kamil added inline comments.
lib/tunnelbroker/tunnelbroker-context.js
395–404

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.Mon, Jun 10, 9:50 AM
lib/tunnelbroker/tunnelbroker-context.js
422

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

How about doesSocketExist?

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

ifSocketExists -> doesSocketExist