Page MenuHomePhabricator

[lib] broadcast updates when becoming aware of new device existence
ClosedPublic

Authored by kamil on Jun 10 2024, 8:59 AM.
Tags
None
Referenced Files
F3379044: D12380.diff
Wed, Nov 27, 2:49 PM
Unknown Object (File)
Sun, Nov 24, 11:20 PM
Unknown Object (File)
Sun, Nov 24, 9:26 PM
Unknown Object (File)
Sun, Nov 24, 7:33 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
Subscribers

Details

Summary

This handles two cases:

  1. Login - this logic will be executed on the device logged in using legacy Identity auth notifying other peers.
  2. Whenever becoming aware of another user - ping him to fetch our newest device list.

Note: This code will be removed in the future after fully launching secondary device auth.

Depends on D12379

Test Plan
  1. Run local TB, and Identity, and make all clients connect to it.
  2. usingCommServicesAccessToken = true
  3. Login on multiple devices (2 devices of user A, 1 device of user B but A is aware of B).
  4. Login on a new device of user B.
  5. All A's and B's devices should receive a device list update.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kamil held this revision as a draft.
kamil edited the test plan for this revision. (Show Details)
kamil added inline comments.
lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

This is to handle Legacy Identity auth and should be removed

kamil published this revision for review.Jun 10 2024, 9:52 AM
tomek added inline comments.
lib/hooks/peer-list-hooks.js
109 ↗(On Diff #41168)

There might be multiple "own" devices. Maybe rename it?

This revision is now accepted and ready to land.Jun 13 2024, 3:38 AM

ownDeviceID -> thisDeviceID

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

What did you mean by "should be removed"? Like should be removed at some point in the future? Or should be removed before landing? (It doesn't appear to have been removed before landing)

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

Should be removed when we sunset legacy identity auth

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)

Got it. Are we tracking this anywhere on Linear?

lib/hooks/peer-list-hooks.js
105–119 ↗(On Diff #41168)