Page MenuHomePhabricator

[lib] handle `IdentityDeviceListUpdated` P2P message
ClosedPublic

Authored by kamil on Jun 10 2024, 4:54 AM.
Tags
None
Referenced Files
F3395155: D12376.id41286.diff
Sun, Dec 1, 2:12 AM
F3395130: D12376.id41156.diff
Sun, Dec 1, 2:05 AM
F3395071: D12376.diff
Sun, Dec 1, 1:31 AM
Unknown Object (File)
Thu, Nov 28, 12:38 PM
Unknown Object (File)
Thu, Nov 28, 1:39 AM
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
Subscribers

Details

Summary

Part of ENG-7837.

Client code to handle message from Identity.

Depends on D12375, D12374, D12372

Test Plan

Tested in D12378.

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 published this revision for review.Jun 10 2024, 9:51 AM
tomek added inline comments.
lib/selectors/user-selectors.js
225

We should explain in a comment what we mean by foreign peer devices.

236–239

This doesn't hurt, but we don't need to repeat a condition that was used while filtering

lib/tunnelbroker/use-peer-to-peer-message-handler.js
222

Talked with @kamil about this call. This broadcast will happen on all the devices and not just on the primary. This isn't a correctness concern, because the payload doesn't include a device list and thus can't be outdated. From the performance point of view, this is wasteful but doesn't hurt us too much. But still, we can consider limiting the broadcast to be sent only from the primary.

222–223

We can consider broadcasting also to our devices which will simplify the logic a bit, but it's up to you.

This revision is now accepted and ready to land.Jun 13 2024, 3:04 AM
  • add comment
  • remove obsolete condition
lib/tunnelbroker/use-peer-to-peer-message-handler.js
222–223

Leaving as it is to avoid sending data trough network when we can handle it locally